1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-23 07:19:15 +00:00

Don't indent template_string contents (bug#61503)

* lisp/progmodes/js.el (js--treesit-indent-rules): Add new rule.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Add new rule.
This commit is contained in:
Theodor Thornhill 2023-02-14 20:53:55 +01:00
parent d97a383996
commit accd88d554
2 changed files with 2 additions and 0 deletions

View File

@ -3442,6 +3442,7 @@ This function is intended for use in `after-change-functions'."
((parent-is "arguments") parent-bol js-indent-level)
((parent-is "array") parent-bol js-indent-level)
((parent-is "formal_parameters") parent-bol js-indent-level)
((parent-is "template_string") no-indent) ; Don't indent the string contents.
((parent-is "template_substitution") parent-bol js-indent-level)
((parent-is "object_pattern") parent-bol js-indent-level)
((parent-is "object") parent-bol js-indent-level)

View File

@ -86,6 +86,7 @@ Argument LANGUAGE is either `typescript' or `tsx'."
((parent-is "arguments") parent-bol typescript-ts-mode-indent-offset)
((parent-is "array") parent-bol typescript-ts-mode-indent-offset)
((parent-is "formal_parameters") parent-bol typescript-ts-mode-indent-offset)
((parent-is "template_string") no-indent) ; Don't indent the string contents.
((parent-is "template_substitution") parent-bol typescript-ts-mode-indent-offset)
((parent-is "object_pattern") parent-bol typescript-ts-mode-indent-offset)
((parent-is "object") parent-bol typescript-ts-mode-indent-offset)