opencode plan
This commit is contained in:
@@ -1,10 +1,40 @@
|
|||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
programs.nixvim.plugins.treesitter = {
|
programs.nixvim = {
|
||||||
enable = true;
|
plugins.treesitter = {
|
||||||
settings = {
|
enable = true;
|
||||||
highlight.enable = true;
|
nixGrammars = true;
|
||||||
indent.enable = true;
|
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
||||||
|
settings = {
|
||||||
|
highlight.enable = true;
|
||||||
|
indent.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
|
|
||||||
|
# Register missing treesitter predicates for compatibility with newer grammars
|
||||||
|
extraConfigLuaPre = ''
|
||||||
|
do
|
||||||
|
local query = require("vim.treesitter.query")
|
||||||
|
local predicates = query.list_predicates()
|
||||||
|
if not vim.tbl_contains(predicates, "is-not?") then
|
||||||
|
query.add_predicate("is-not?", function(match, pattern, source, predicate)
|
||||||
|
local dominated_by = predicate[2]
|
||||||
|
local dominated = false
|
||||||
|
for _, node in pairs(match) do
|
||||||
|
if type(node) == "userdata" then
|
||||||
|
local current = node:parent()
|
||||||
|
while current do
|
||||||
|
if current:type() == dominated_by then
|
||||||
|
dominated = true
|
||||||
|
break
|
||||||
|
end
|
||||||
|
current = current:parent()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return not dominated
|
||||||
|
end, { force = true, all = true })
|
||||||
|
end
|
||||||
|
end
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
home.sessionVariables = {
|
||||||
|
OPENCODE_EXPERIMENTAL_PLAN_MODE = 1;
|
||||||
|
};
|
||||||
programs.opencode = {
|
programs.opencode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.opencode;
|
package = inputs.llm-agents.packages.${pkgs.stdenv.hostPlatform.system}.opencode;
|
||||||
|
|||||||
Reference in New Issue
Block a user