1
0
mirror of https://github.com/helix-editor/helix synced 2024-11-10 10:34:45 +01:00
helix/runtime/queries/bash/highlights.scm

80 lines
943 B
Scheme

[
(string)
(raw_string)
(ansi_c_string)
(heredoc_body)
] @string
[
(heredoc_start)
(heredoc_end)
] @label
(command_name) @function
(variable_name) @variable
((variable_name) @constant
(#match? @constant "^[A-Z][A-Z_0-9]*$"))
[
"if"
"then"
"else"
"elif"
"fi"
"case"
"in"
"esac"
] @keyword.control.conditional
[
"for"
"do"
"done"
"select"
"until"
"while"
] @keyword.control.repeat
[
"declare"
"typeset"
"export"
"readonly"
"local"
"unset"
"unsetenv"
] @keyword
"function" @keyword.function
(comment) @comment
((word) @constant.builtin.boolean
(#any-of? @constant.builtin.boolean "true" "false"))
(function_definition name: (word) @function)
(file_descriptor) @constant.numeric.integer
[
(command_substitution)
(process_substitution)
(expansion)
] @embedded
[
"$"
"&&"
">"
">>"
"<"
"|"
] @operator
(
(command (_) @constant)
(#match? @constant "^-")
)