From 05d0920595f09da9dd9befced0493da41d3b17cd Mon Sep 17 00:00:00 2001 From: Paul-Henri Froidmont Date: Wed, 25 Mar 2026 01:21:20 +0100 Subject: [PATCH] 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 ":"). --- modules/editor/vim/lua/plugins/treesitter.lua | 11 +++++------ modules/editor/vim/vim.nix | 2 ++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/editor/vim/lua/plugins/treesitter.lua b/modules/editor/vim/lua/plugins/treesitter.lua index 563b468..86406a6 100644 --- a/modules/editor/vim/lua/plugins/treesitter.lua +++ b/modules/editor/vim/lua/plugins/treesitter.lua @@ -1,11 +1,10 @@ return { { "nvim-treesitter/nvim-treesitter", - opts = { - auto_install = false, - sync_install = false, - ensure_installed = {}, - parser_install_dir = vim.fs.joinpath(vim.fn.stdpath('data'), 'site'), - }, + opts = function(_, opts) + opts.auto_install = false + opts.sync_install = false + opts.ensure_installed = {} + end, }, } diff --git a/modules/editor/vim/vim.nix b/modules/editor/vim/vim.nix index e8ca15e..1874cdc 100644 --- a/modules/editor/vim/vim.nix +++ b/modules/editor/vim/vim.nix @@ -141,6 +141,8 @@ in extraPackages = with pkgs; [ gcc # needed for nvim-treesitter + tree-sitter + # HTML, CSS, JSON vscode-langservers-extracted