Skip to content

How to ignore grammar in Tree-sitter? #2091

Answered by khaneliman
refaelsh asked this question in Q&A
Discussion options

You must be logged in to vote

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 nixGrammars and grammarPackages in a similar way, you'd need to do something to set grammarPackages to a filtered list excluding the packages you want.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@refaelsh
Comment options

refaelsh Aug 26, 2024
Collaborator Author

Answer selected by refaelsh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants