Replies: 2 comments 13 replies
-
Are these the highlights you're using? https://github.com/alemuller/tree-sitter-vhdl/blob/main/queries/highlights.scm It looks like they only highlight syntax errors. For general purpose syntax highlighting, it looks like you'll need to write the queries yourself; I don't see existing ones in nvim-treesitter to use as inspiration. |
Beta Was this translation helpful? Give feedback.
-
@the-mikedavis do you know whether it is possible to query to highlight node when it matches some string? I have a simple node: basic_identifier: $ => token(seq(
/[a-zA-Z]/,
repeat(seq(
optional('_'),
/[a-zA-Z0-9]/
))
)), This node should be highlighted only if it matches some string pattern, for example I have asked in the tree-sitter repo tree-sitter/tree-sitter#1838, but the answer is not unequivocal. |
Beta Was this translation helpful? Give feedback.
-
I am trying to add support for the VHDL language. I have followed instruction from the https://docs.helix-editor.com/guides/adding_languages.html.
I have added following section to the
languages.toml
:Then, I have recompiled and installed helix. I have also added
highlights.scm
to the~/.config/helix/runtime/queries/vhdl
.However, when I open any
.vhd
file it looks like something is wrong, as there is no highlighting andtree-sitter-scopes
command always returns[]
, no matter where in the source code the cursor is placed.Beta Was this translation helpful? Give feedback.
All reactions