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

69 lines
748 B
Scheme
Raw Normal View History

2021-04-09 12:42:49 +04:00
[
(string)
(raw_string)
(heredoc_body)
(heredoc_start)
] @string
(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 "^-")
)