Start using and suggesting standardized Tree-sitter highlights captures #23371
uncenter
announced in
Product Research
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Check for existing issues
Describe the feature
Zed currently uses non-standard captures in its builtin extensions/languages and themes, which has led to community language and theme extensions doing so as well. This is detrimental, as the non-standard subset of keywords Zed uses limit the precision of Tree-sitter highlighting. (This is distinctly different from #9656, where the injection captures are different in a manner that is actually breaking for Zed.) Standardized keywords can be found from https://neovim.io/doc/user/treesitter.html#treesitter-highlight-groups and some from https://docs.helix-editor.com/themes.html#scopes.
keyword.type
.For the most part, 1) and 3) can be achieved somewhat easily. The docs update is small, and there aren't too many language extensions to begin with in this repository. However 2) and 4), theme support, is trickier - we don't want syntax highlighting regressions (which could occur by improving the captures without theme support), only improvements. I don't know where to begin updating Zed's builtin themes, and I'm not sure there exists a good way to announce changes like this to extension authors.
Some anecdotal? evidence of this:
Examples of improvements via adopting nvim-treesitter queries:
Zed Version and System Specs
N/A
If applicable, add mockups / screenshots to help present your vision of the feature
No response
Beta Was this translation helpful? Give feedback.
All reactions