Skip to content

[BUG] nvim-treesitter highlighting disabling per language don't work #4163

@Sipepper

Description

@Sipepper

Plugin

treesitter

Nixpkgs Release

unstable

Home Manager Release

unstable

I have read the FAQ

  • I have read the FAQ and my bug is not listed there.

Description

Previously (sorry, I can't pinpoint specific time) the treesitter configuration like this:

treesitter = {
  enable = true;
  grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
  settings = {
    highlight = {
      enable = true;
      disable = [ "latex" "html" ];
    };
  };
};

Allowed me to disable syntax highlighting from treesitter in favor of vimtex. Now it's not working. I tried to find a solution to excluding which language for treesitter to highlight but still can't figure it out.

Minimal, Reproducible Example (MRE)

programs.nixvim = {
  enable = true;

  plugins.treesitter = {
    enable = true;
    grammarPackages = pkgs.vimPlugins.nvim-treesitter.allGrammars;
    settings = {
      highlight = {
        enable = true;
        disable = [ "latex" "html" ];
      };
    };
  };
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions