emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/typescript-mode 178ceca2d4 188/222: Add option for list it


From: ELPA Syncer
Subject: [nongnu] elpa/typescript-mode 178ceca2d4 188/222: Add option for list items indenting
Date: Sun, 6 Feb 2022 16:59:31 -0500 (EST)

branch: elpa/typescript-mode
commit 178ceca2d4e4a0a45d46345a46ec177b7952468d
Author: Ivan Sokolov <ivan-p-sokolov@ya.ru>
Commit: Ivan Sokolov <ivan-p-sokolov@ya.ru>

    Add option for list items indenting
---
 typescript-mode.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/typescript-mode.el b/typescript-mode.el
index 09add95553..7bad249e70 100644
--- a/typescript-mode.el
+++ b/typescript-mode.el
@@ -653,6 +653,11 @@ replicate tsserver behaviour. Indent level is taken to be
   :type 'boolean
   :group 'typescript)
 
+(defcustom typescript-indent-list-items t
+  "Enable indenting of list items, useful for certain code styles."
+  :type 'boolean
+  :group 'typescript)
+
 (defcustom typescript-auto-indent-flag t
   "Whether to automatically indent when typing punctuation characters.
 If non-nil, the characters {}();,: also indent the current line
@@ -2535,7 +2540,8 @@ moved on success."
                        (if (and in-switch-p typescript-indent-switch-clauses)
                            (+ indent typescript-indent-level)
                          indent)))
-                 (unless same-indent-p
+                 (when (and (not same-indent-p)
+                            typescript-indent-list-items)
                    (forward-char)
                    (skip-chars-forward " \t"))
                  (if continued-expr-p



reply via email to

[Prev in Thread] Current Thread [Next in Thread]