]> git.eshelyaron.com Git - emacs.git/commit
Fix typescript-ts-mode indentation (bug#77803)
authorKonstantin Kharlamov <Hi-Angel@yandex.ru>
Tue, 15 Apr 2025 14:34:11 +0000 (17:34 +0300)
committerEshel Yaron <me@eshelyaron.com>
Mon, 21 Apr 2025 20:38:20 +0000 (22:38 +0200)
commit66aaa302a4652359847a632b861f063041191aa9
treed8632e5bfcd81d0ee07c6142b5781cfe8ca6c912
parent30f87d82d08112755f76c0d08e32ed990835b5a9
Fix typescript-ts-mode indentation (bug#77803)

Don't align variable names to their declaratory expression.

Before this commit in code like:

    const a = 1,
          b = 2;

the b would get indented to `const'.  Similarly for `var' and
`let'. The expected behavior instead is getting indented to
`typescript-ts-mode-indent-offset'.

* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--indent-rules): Indent identifiers declarations to
`typescript-ts-mode-indent-offset'.
* test/lisp/progmodes/typescript-ts-mode-resources/indent.erts
(Lexical and variable declarations): Update test accordingly.

(cherry picked from commit 9750333dde9d23510341632d1c9a950d9c67415c)
lisp/progmodes/typescript-ts-mode.el
test/lisp/progmodes/typescript-ts-mode-resources/indent.erts