fix(nvim): stop treesitter parser drift from local site installs

Force nvim-treesitter to avoid startup parser installs and rely on Nix-provided grammars only, preventing stale ~/.local/share/nvim/site/parser .so files from causing query/parser mismatches (e.g. vim "tab" node errors on ":").
This commit is contained in:
Paul-Henri Froidmont 2026-03-25 01:21:20 +01:00
parent c5abace3d9
commit 05d0920595
Signed by: phfroidmont
GPG key ID: BE948AFD7E7873BE
2 changed files with 7 additions and 6 deletions

View file

@ -1,11 +1,10 @@
return { return {
{ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
opts = { opts = function(_, opts)
auto_install = false, opts.auto_install = false
sync_install = false, opts.sync_install = false
ensure_installed = {}, opts.ensure_installed = {}
parser_install_dir = vim.fs.joinpath(vim.fn.stdpath('data'), 'site'), end,
},
}, },
} }

View file

@ -141,6 +141,8 @@ in
extraPackages = with pkgs; [ extraPackages = with pkgs; [
gcc # needed for nvim-treesitter gcc # needed for nvim-treesitter
tree-sitter
# HTML, CSS, JSON # HTML, CSS, JSON
vscode-langservers-extracted vscode-langservers-extracted