diff --git a/packages/language-shellscript/grammars/tree-sitter/highlights.scm b/packages/language-shellscript/grammars/tree-sitter/highlights.scm index 2f914eac3c..505d178c86 100644 --- a/packages/language-shellscript/grammars/tree-sitter/highlights.scm +++ b/packages/language-shellscript/grammars/tree-sitter/highlights.scm @@ -68,6 +68,19 @@ (string "\"" @punctuation.definition.string.end.shell (#is? test.last true)) (raw_string) @string.quoted.single.shell +((raw_string) @punctuation.definition.string.begin.shell + (#match? @punctuation.definition.string.begin.shell "^.") + (#set! adjust.startAndEndAroundFirstMatchOf "^.")) +((raw_string) @punctuation.definition.string.end.shell + (#match? @punctuation.definition.string.begin.shell ".$") + (#set! adjust.startAndEndAroundFirstMatchOf ".$")) +(ansi_c_string) @string.quoted.single.dollar.shell +((ansi_c_string) @punctuation.definition.string.begin.shell + (#match? @punctuation.definition.string.begin.shell "^..") + (#set! adjust.startAndEndAroundFirstMatchOf "^..")) +((ansi_c_string) @punctuation.definition.string.end.shell + (#match? @punctuation.definition.string.end.shell ".$") + (#set! adjust.startAndEndAroundFirstMatchOf ".$")) (string (command_substitution) @meta.embedded.line.subshell.shell)