mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-04 11:23:24 +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:
parent
5b8e0b3154
commit
80e1037df4
1 changed files with 8 additions and 1 deletions
|
@ -1619,7 +1619,8 @@ not written in Bash or sh."
|
||||||
(setq-local treesit-font-lock-feature-list
|
(setq-local treesit-font-lock-feature-list
|
||||||
'(( comment function)
|
'(( comment function)
|
||||||
( command declaration-command keyword string)
|
( command declaration-command keyword string)
|
||||||
( builtin-variable constant heredoc number variable)
|
( builtin-variable constant heredoc number
|
||||||
|
string-interpolation variable)
|
||||||
( bracket delimiter misc-punctuation operator)))
|
( bracket delimiter misc-punctuation operator)))
|
||||||
(setq-local treesit-font-lock-settings
|
(setq-local treesit-font-lock-settings
|
||||||
sh-mode--treesit-settings)
|
sh-mode--treesit-settings)
|
||||||
|
@ -3289,6 +3290,12 @@ See `sh-mode--treesit-other-keywords' and
|
||||||
:language 'bash
|
:language 'bash
|
||||||
'([(string) (raw_string)] @font-lock-string-face)
|
'([(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
|
:feature 'heredoc
|
||||||
:language 'bash
|
:language 'bash
|
||||||
'([(heredoc_start) (heredoc_body)] @sh-heredoc)
|
'([(heredoc_start) (heredoc_body)] @sh-heredoc)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue