How to ignore grammar in Tree-sitter? #2091
-
I used to have this in my init.lua: 'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
config = function()
require("nvim-treesitter.configs").setup({
ensure_installed = "all",
ignore_install = { 'org' },
auto_install = true,
highlight = { enable = true },
indent = { enable = true },
})
end Now I have this in my configuration.nix: treesitter = {
enable = true;
settings = {
highlight.enable = true;
indent.enable = true;
};
}; My question so what do I do about Thanks in advance. |
Beta Was this translation helpful? Give feedback.
Answered by
khaneliman
Aug 26, 2024
Replies: 1 comment 1 reply
-
The default behavior of our nixvim module will install all grammars from nixpkgs. To do a similar config using treesitter managed grammars you'd do this: treesitter = {
enable = true;
nixGrammars = false;
settings = {
auto_install = true;
ensure_installed = "all";
ignore_install = [ "org" ];
highlight.enable = true;
indent.enable = true;
};
}; If you'd like to manage them all from nixpkgs using |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
refaelsh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The default behavior of our nixvim module will install all grammars from nixpkgs. To do a similar config using treesitter managed grammars you'd do this:
If you'd like to manage them all from nixpkgs using
nixGrammars
andgrammarPackages
in a similar way, you'd need to do something to setgrammarPackages
to a filtered list excluding the packages you want.