sh-mode--treesit-settings: Ensure all variable use is treated the
same way.
Before this patch the following commands would all be treated differently:
echo "${var}"
echo "$var"
echo ${var}
echo $var
Now they are treated the same.
* lisp/progmodes/sh-script.el (sh-mode--treesit-settings): Tweak
rules. (Bug#78167)
(cherry picked from commit
7265be09cebc9ee752b688b7a85fb1ac18b45ef5)
:language 'bash
:override t
'((command_substitution) @sh-quoted-exec
- (string (expansion (variable_name) @font-lock-variable-use-face)))
+ (expansion (variable_name) @font-lock-variable-use-face)
+ (expansion ["${" "}"] @font-lock-bracket-face)
+ (simple_expansion
+ "$" @font-lock-bracket-face
+ (variable_name) @font-lock-variable-use-face))
:feature 'heredoc
:language 'bash