Skip to content

theme: question on how to target identifier highlight #11504

Answered by the-mikedavis
yofriadi asked this question in Q&A
Discussion options

You must be logged in to vote

You can use the :tree-sitter-highlight-name command to figure out the theme key under the cursor. identifier is the name of the node in the syntax tree. Syntax highlight works by running a tree-sitter query like https://github.com/helix-editor/helix/blob/master/runtime/queries/go/highlights.scm over the tree and the @capturename captures in that file are the theme keys. So an identifier might be mapped to a theme key of variable, function or something else depending on the context it's used in

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yofriadi
Comment options

Answer selected by yofriadi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #11501 on August 16, 2024 12:52.