shaunsingh / nord.nvim

Neovim theme based off of the Nord Color Palette, written in lua with tree sitter support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect treesitter hightlighting

Kranzes opened this issue · comments

The syntax highlighting of nord.nvim (nord vim too) don't follow the same syntax highlighting as other themes when using treesitter's highlighting functionality.
Notice the lack of highlighting in the outputsBuilder part.

See below:

  • First image - nord.nvim + treesitter
  • Second image - nord.nvim only
  • Third image - default nvim theme + treesitter
  • Fourth image - dracula + treesitter
    image
    image
    image
    image

I'm having the same issue as well with Python. The self keyword is not highlighted when using nord but is when using other themes like Tokyo Night.

@Kranzes @Snow-0 from my experience Treesitter's default syntax highlighting groups are rarely enough to provide rich language-specific highlighting on their own. Often the theme needs to remap certain groups to its own palette in order to improve the meaning of colors in certain languages.

You can check how a certain keyword was highlighted by enabling https://github.com/nvim-treesitter/playground and executing the command :TSHighlightCapturesUnderCursor after moving the cursor to that keyword.