mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-17 19:00:02 -04:00
Refine highlights.scm:
- Match repeat, conditional, etc. to their corresponding commands - Clean up `@parameter` match - Add `$ENV` and `$CACHE` to queries
This commit is contained in:
parent
9dac8b403d
commit
90cddb0112
1 changed files with 94 additions and 80 deletions
|
|
@ -1,19 +1,18 @@
|
||||||
(bracket_content) @parameter
|
[
|
||||||
(quoted_element) @parameter
|
(bracket_content)
|
||||||
(unquoted_argument) @parameter
|
(quoted_element)
|
||||||
|
(unquoted_argument)
|
||||||
|
] @parameter
|
||||||
|
|
||||||
(variable) @variable
|
(variable) @variable
|
||||||
|
|
||||||
|
[
|
||||||
|
"$ENV"
|
||||||
|
"$CACHE"
|
||||||
|
] @variable.builtin
|
||||||
|
|
||||||
[
|
[
|
||||||
(normal_command)
|
(normal_command)
|
||||||
(if_command)
|
|
||||||
(elseif_command)
|
|
||||||
(else_command)
|
|
||||||
(endif_command)
|
|
||||||
(foreach_command)
|
|
||||||
(endforeach_command)
|
|
||||||
(while_command)
|
|
||||||
(endwhile_command)
|
|
||||||
(function_command)
|
(function_command)
|
||||||
(endfunction_command)
|
(endfunction_command)
|
||||||
(macro_command)
|
(macro_command)
|
||||||
|
|
@ -21,6 +20,20 @@
|
||||||
(message_command)
|
(message_command)
|
||||||
] @function
|
] @function
|
||||||
|
|
||||||
|
[
|
||||||
|
(if_command)
|
||||||
|
(elseif_command)
|
||||||
|
(else_command)
|
||||||
|
(endif_command)
|
||||||
|
] @conditional
|
||||||
|
|
||||||
|
[
|
||||||
|
(foreach_command)
|
||||||
|
(endforeach_command)
|
||||||
|
(while_command)
|
||||||
|
(endwhile_command)
|
||||||
|
] @repeat
|
||||||
|
|
||||||
[
|
[
|
||||||
"1"
|
"1"
|
||||||
"ON"
|
"ON"
|
||||||
|
|
@ -85,3 +98,4 @@
|
||||||
"CHECK_PASS"
|
"CHECK_PASS"
|
||||||
"CHECK_FAIL"
|
"CHECK_FAIL"
|
||||||
] @keyword
|
] @keyword
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue