diff --git a/modules/_neovim/plugins/treesitter.nix b/modules/_neovim/plugins/treesitter.nix index f9220d8..22b01ea 100644 --- a/modules/_neovim/plugins/treesitter.nix +++ b/modules/_neovim/plugins/treesitter.nix @@ -35,6 +35,26 @@ end, { force = true, all = true }) end end + + -- Fix grammar-bundled treesitter queries that use #match? with Lua pattern + -- syntax (e.g. %d) instead of Vim regex. Neovim 0.11 picks the first + -- non-extending query file in the rtp as the base, so the grammar-bundled + -- (buggy) queries take precedence over the corrected site-level queries. + -- Override affected languages with the site-level version. + do + local langs = { "sql" } + for _, lang in ipairs(langs) do + local files = vim.api.nvim_get_runtime_file( + "queries/" .. lang .. "/highlights.scm", true) + if #files > 1 then + local f = io.open(files[#files]) + if f then + vim.treesitter.query.set(lang, "highlights", f:read("*all")) + f:close() + end + end + end + end ''; }; } diff --git a/modules/ai-tools.nix b/modules/ai-tools.nix index 0c46a5c..45823b2 100644 --- a/modules/ai-tools.nix +++ b/modules/ai-tools.nix @@ -79,7 +79,7 @@ ExecStart = "${inputs'.llm-agents.packages.opencode}/bin/opencode serve --port 18822"; Restart = "on-failure"; RestartSec = 5; - Environment = "PATH=${pkgs.lib.makeBinPath [inputs'.llm-agents.packages.opencode pkgs.coreutils pkgs.nodejs_24 pkgs.nushell]}:/run/current-system/sw/bin"; + Environment = "PATH=${config.home.profileDirectory}/bin:/run/current-system/sw/bin"; }; Install = { WantedBy = ["default.target"];