From ed2c6da5a0959d5c0462ef64ac08d3faa4e92861 Mon Sep 17 00:00:00 2001 From: Amaan Qureshi Date: Thu, 24 Aug 2023 17:12:10 -0400 Subject: feat(bash): add missing highlights --- queries/bash/highlights.scm | 39 ++++++++++++++++++++++++++++++++------- 1 file changed, 32 insertions(+), 7 deletions(-) (limited to 'queries/bash') diff --git a/queries/bash/highlights.scm b/queries/bash/highlights.scm index dbe6f6883..8cc84194c 100644 --- a/queries/bash/highlights.scm +++ b/queries/bash/highlights.scm @@ -3,11 +3,14 @@ "{" "}" "[" "]" "[[" "]]" + "((" "))" ] @punctuation.bracket [ ";" ";;" + ";&" + ";;&" "&" ] @punctuation.delimiter @@ -18,11 +21,24 @@ "<<" "&&" "|" + "|&" "||" "=" + "+=" "=~" "==" "!=" + + "&>" + "&>>" + "<&" + ">&" + ">|" + + "<<-" + "<<<" + + ".." ] @operator ; Do *not* spell check strings since they typically have some sort of @@ -42,6 +58,7 @@ ] @label (variable_assignment (word) @string) +(command argument: "$" @string) ; bare dollar [ "if" @@ -64,11 +81,13 @@ ] @repeat [ - "declare" - "export" - "local" - "readonly" - "unset" + "declare" + "typeset" + "export" + "readonly" + "local" + "unset" + "unsetenv" ] @keyword "function" @keyword.function @@ -129,9 +148,10 @@ (#lua-match? @number "^[0-9]+$")) (file_redirect - descriptor: (file_descriptor) @operator destination: (word) @parameter) +(file_descriptor) @operator + (simple_expansion "$" @punctuation.special) @none (expansion @@ -146,6 +166,8 @@ index: (word) @character.special)) (#any-of? @character.special "@" "*")) +"``" @punctuation.special + (variable_name) @variable ((variable_name) @constant @@ -154,7 +176,10 @@ (case_item value: (word) @parameter) -(regex) @string.regex +[ + (regex) + (extglob_pattern) +] @string.regex ((program . (comment) @preproc) (#lua-match? @preproc "^#!/")) -- cgit v1.2.3-70-g09d2