1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

Add string-interpolation feature to bash-ts-mode

* lisp/progmodes/sh-script.el:
(bash-ts-mode): Add string-interpolation feature.
(sh-mode--treesit-settings): Add rule for string-interpolation feature.
This commit is contained in:
Yuan Fu 2023-03-05 14:16:58 -08:00
parent 5b8e0b3154
commit 80e1037df4
No known key found for this signature in database
GPG Key ID: 56E19BC57664A442

View File

@ -1619,7 +1619,8 @@ not written in Bash or sh."
(setq-local treesit-font-lock-feature-list
'(( comment function)
( command declaration-command keyword string)
( builtin-variable constant heredoc number variable)
( builtin-variable constant heredoc number
string-interpolation variable)
( bracket delimiter misc-punctuation operator)))
(setq-local treesit-font-lock-settings
sh-mode--treesit-settings)
@ -3289,6 +3290,12 @@ See `sh-mode--treesit-other-keywords' and
:language 'bash
'([(string) (raw_string)] @font-lock-string-face)
:feature 'string-interpolation
:language 'bash
:override t
'((command_substitution) @sh-quoted-exec
(string (expansion (variable_name) @font-lock-variable-name-face)))
:feature 'heredoc
:language 'bash
'([(heredoc_start) (heredoc_body)] @sh-heredoc)