-
Hello, for the longest time I've been dealing with tedious issues with treesitter. It sometimes goes away, sometimes doesn't, but I've had enough. I saw on the FAQ that this is a common error caused by multiple parsers. I ran
I can't figure out for the life of me how to disable the standard nvim parser, or any sort of acknowledgement online that this is a feature and how to get rid of it. I hope someone knows? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
You can't (or rather, shouldn't). You need to make sure that the parser directory has the same precedence over the bundled directory that the query directory has over the one in $VIMRUNTIME. How to do that with Nix, I cannot tell you, sorry. |
Beta Was this translation helpful? Give feedback.
-
one way is to manipulate the for example, I originally have multiple paths for :echo nvim_get_runtime_file('parser', v:true)
['/Users/rubelagu/.local/share/nvim/lazy/nvim-treesitter/parser', '/usr/local/Cellar/neovim/0.9.5/lib/nvim/parser'] I can remove the vim.opt.rtp:remove("/usr/local/Cellar/neovim/0.9.5/lib/nvim") -- this is the important bit
require("lazy").setup("ecerulm.plugins", {
-- https://github.com/folke/lazy.nvim
performance = {
rtp = {
reset = false -- I need this because otherwise lazy.nvim reset the runtimepath
},
},
change_detection = {
enabled = true, -- automatically check for config file changes and reload the ui
notify = false, -- turn off notifications whenever plugin changes are made
},
})
Alternatively you can put the vim.opt.rtp:remove("/usr/local/Cellar/neovim/0.9.5/lib/nvim") after the lazy.nvim and that should work too. |
Beta Was this translation helpful? Give feedback.
Thank you for your reply, I'm trying to use the package
pkgs.vimPlugins.nvim-treesitter.withAllGrammers
. The command that you suggest to run now fills my screen with parsers, but at the same time I'm not seeing the errors anymore, so maybe this is how we should be setting this up on nix.Thank you for letting me know this wasn't really a config issue and more of a nix thing :)