Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Treesitter syntax highlighting is broken #2652

Open
1 task done
willifan opened this issue Dec 13, 2024 · 1 comment
Open
1 task done

[BUG] Treesitter syntax highlighting is broken #2652

willifan opened this issue Dec 13, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@willifan
Copy link

Field Description
Plugin treesitter
Nixpkgs unstable
Home Manager unstable
  • I have read the FAQ and my bug is not listed there.

Description

The syntax of many expressions when editing nix is not highlighted correctly, I have attached images to show this better below. I have checked a few commits in my nixos flake to know when this happened which was December 1st when I updated my flake, the last update before that is November 14th so it must have been introduced during that time. I have tested :checkhealth nvim-tree-sitter and nix is available, when I dis- or enable treesitter the syntax highlighting does change, it is just incorrect. Other languages, I tested c++ and rust, are highlighted correctly so it seems like an issue with tree-sitter-nix, although I did not find any commits there, or anywhere else for that matter, that seem like a likely cause.

Minimal, Reproducible Example (MRE)

programs.nixvim = {
  enable = true;
  plugins.treesitter = {
    enable = true;
    settings.highlight.enable = true;
  };
};

How it should look:
image
How it looks now
image

@willifan willifan added the bug Something isn't working label Dec 13, 2024
@MattSturgeon
Copy link
Member

Just a guess, but sometimes there's also LSP-baser highlighting in addition to treesitter.

If you are seeing something change when toggling treesitter's highlighting it sounds to me like that's working.

Perhaps it is LSP based highlighting that changed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants