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

Removes TSError syntax highlight #270

Merged
merged 1 commit into from Sep 12, 2021

Conversation

georg3tom
Copy link
Contributor

fixes: #269

@crispgm
Copy link

crispgm commented Aug 18, 2021

This is a great fix 👍🏻

@arcticicestudio
Copy link
Contributor

Hi @georg3tom 👋, thanks for your contribution 👍

I've posted some questions in #269 about the impact of this change.

Copy link
Contributor

@arcticicestudio arcticicestudio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM after clarifying the impact in #269. Thanks again for this improvement!

@arcticicestudio arcticicestudio merged commit e3e8a75 into nordtheme:develop Sep 12, 2021
arcticicestudio pushed a commit that referenced this pull request Sep 12, 2021
The `TSError` group is used to highlight syntax/parser errors [1] which
caused an aggressive styling where the background color of many syntax
elements was rendered with `nord11` during typing. This was caused due
to the fast processing of `tree-sitter` which also resulted in highlight
flickering.
This is a known problem and was fixed by many other themes (e.g. Dracula
[2]) by removing the group again. One of the core maintainers of
`nvim-treesitter` provided a solution by remapping groups [3] and also
mentioned that the group is styled by the `nvim-treesitter` plugin but
the active theme [4].

Syntax errors can still be highlighted through linters and parsers like
Neovim's LSP [5] can still be used instead to highlight errors with the
correct style (e.g. only change the foreground color of a single word).

[1]: https://github.com/nvim-treesitter/nvim-treesitter/blob/fb5d6e04/doc/nvim-treesitter.txt#L493-L495
[2]: dracula/vim#232
[3]: nvim-treesitter/nvim-treesitter#78 (comment)
[4]: nvim-treesitter/nvim-treesitter#1016 (comment)
[5]: https://github.com/neovim/nvim-lspconfig

Fixes GH-269
@arcticicestudio arcticicestudio added this to the 0.18.0 milestone Sep 12, 2021
@svengreb
Copy link
Member

Release Note Assets

Before

After

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Aggressive error highlight with Treesitter
4 participants