Skip to content

Commit

Permalink
feat: update bash grammar to latest tree-sitter-bash rev
Browse files Browse the repository at this point in the history
  • Loading branch information
CSergienko committed Apr 20, 2024
1 parent 081f7d0 commit 82c4caa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 27 deletions.
2 changes: 1 addition & 1 deletion languages.toml
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ indent = { tab-width = 2, unit = " " }

[[grammar]]
name = "bash"
source = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "275effdfc0edce774acf7d481f9ea195c6c403cd" }
source = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "f8fb3274f72a30896075585b32b0c54cad65c086" }

[[language]]
name = "php"
Expand Down
39 changes: 13 additions & 26 deletions runtime/queries/bash/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -7,45 +7,33 @@

(command_name) @function

(variable_name) @variable.other.member
(variable_name) @property

[
"if"
"then"
"else"
"elif"
"fi"
"case"
"in"
"esac"
] @keyword.control.conditional

[
"for"
"do"
"done"
"elif"
"else"
"esac"
"export"
"fi"
"for"
"function"
"if"
"in"
"select"
"then"
"unset"
"until"
"while"
] @keyword.control.repeat

[
"declare"
"typeset"
"export"
"readonly"
"local"
"unset"
"unsetenv"
] @keyword

"function" @keyword.function

(comment) @comment

(function_definition name: (word) @function)

(file_descriptor) @constant.numeric.integer
(file_descriptor) @number

[
(command_substitution)
Expand All @@ -60,7 +48,6 @@
">>"
"<"
"|"
(expansion_flags)
] @operator

(
Expand Down

0 comments on commit 82c4caa

Please sign in to comment.