helix/runtime/queries/bash/highlights.scm
Michael Davis 5952d564d1
Reverse highlight precedence ordering (#9458)
Co-authored-by: postsolar <120750161+postsolar@users.noreply.github.com>
Co-authored-by: Iorvethe <58810330+Iorvethe@users.noreply.github.com>
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: gabydd <gabydinnerdavid@gmail.com>
2025-02-02 18:17:10 -06:00

76 lines
885 B
Scheme

[
(string)
(raw_string)
(ansi_c_string)
(heredoc_body)
] @string
[
(heredoc_start)
(heredoc_end)
] @label
(command_name) @function
(variable_name) @variable.other.member
[
"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 "^-")
)