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:
Uy Ha 2021-06-24 22:23:11 +02:00 committed by Stephan Seitz
parent 9dac8b403d
commit 90cddb0112

View file

@ -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