Language specific syntax highlighting #13631
Replies: 2 comments 3 replies
|
You can add a There you should put a config.toml, and use a highlight.scm file to map ranges of source codes (as AST sub-trees) to logical "highlight-names" (as dubbed by tree-sitter). These "highlight names" are made available by Zed to highlight code as specified in the Or: the syntax keys available to themes for a given language are the highlight names exported by a highlight.scm, default Zed one or provided by your extension, which itself depends on the grammar used to construct the AST. You can blindly copy languages folders from Zed for your favourites one into your extension and start from there. I think that the highligh.scm shadows Zed default one, and this only when you select the corresponding theme, but you should check. |
|
Thanks for reaching out. We want to better support our community, and the best way for us to do that is through our official Discord. The team is active there and happy to help. We’re closing the “Help and General Q&A” category on GitHub Discussions and directing all support questions to Discord going forward. |
Uh oh!
There was an error while loading. Please reload this page.
I'm working on a theme, but due to the syntax keys being a little too normalized across languages I can't dial it in the way my textmate theme is/was.
Was curious if there's a way to apply syntax styles based on language or have language overrides within the theme?
All reactions