shaunsingh / nord.nvim

Neovim theme based off of the Nord Color Palette, written in lua with tree sitter support
GNU General Public License v2.0
803 stars 107 forks source link

Incorrect treesitter hightlighting #68

Open Kranzes opened 2 years ago

Kranzes commented 2 years ago

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:

Snow-0 commented 2 years ago

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.

antoineco commented 2 years ago

@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.