helix-mirror/runtime/queries/bash/highlights.scm

74 lines
794 B
Scheme
Raw Normal View History

2021-04-09 12:42:49 +04:00
[
(string)
(raw_string)
(ansi_c_string)
2021-04-09 12:42:49 +04:00
(heredoc_body)
] @string
[
(heredoc_start)
(heredoc_end)
] @label
2021-04-09 12:42:49 +04:00
(command_name) @function
(variable_name) @variable.other.member
2021-04-09 12:42:49 +04:00
[
"if"
"then"
"else"
"elif"
"fi"
2021-04-09 12:42:49 +04:00
"case"
"in"
"esac"
] @keyword.control.conditional
[
"for"
2021-04-09 12:42:49 +04:00
"do"
"done"
"select"
"until"
"while"
] @keyword.control.repeat
[
"declare"
"typeset"
2021-04-09 12:42:49 +04:00
"export"
"readonly"
"local"
2021-04-09 12:42:49 +04:00
"unset"
"unsetenv"
2021-04-09 12:42:49 +04:00
] @keyword
"function" @keyword.function
2021-04-09 12:42:49 +04:00
(comment) @comment
(function_definition name: (word) @function)
(file_descriptor) @constant.numeric.integer
2021-04-09 12:42:49 +04:00
[
(command_substitution)
(process_substitution)
(expansion)
]@embedded
[
"$"
"&&"
">"
">>"
"<"
"|"
] @operator
(
(command (_) @constant)
(#match? @constant "^-")
)