[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-29 80e1037df44: Add string-interpolation feature to bash-ts-mode
From: |
Yuan Fu |
Subject: |
emacs-29 80e1037df44: Add string-interpolation feature to bash-ts-mode |
Date: |
Sun, 5 Mar 2023 17:19:01 -0500 (EST) |
branch: emacs-29
commit 80e1037df44c0b4607423d744a8b9b409a15efce
Author: Yuan Fu <casouri@gmail.com>
Commit: Yuan Fu <casouri@gmail.com>
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.
---
lisp/progmodes/sh-script.el | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el
index 4c06efc8146..29820049636 100644
--- a/lisp/progmodes/sh-script.el
+++ b/lisp/progmodes/sh-script.el
@@ -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)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-29 80e1037df44: Add string-interpolation feature to bash-ts-mode,
Yuan Fu <=