branch: elpa/clojure-ts-mode
commit 88e92ee2f06182a7d3420ff988723569f6b181d6
Author: Bozhidar Batsov <[email protected]>
Commit: Bozhidar Batsov <[email protected]>

    Add missing defstruct semantic indentation rule
    
    defstruct should have a (:block 1) rule to match cljfmt defaults.
---
 clojure-ts-mode.el                       | 1 +
 test/clojure-ts-mode-indentation-test.el | 6 +++++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/clojure-ts-mode.el b/clojure-ts-mode.el
index 636699776f..8dd5b28235 100644
--- a/clojure-ts-mode.el
+++ b/clojure-ts-mode.el
@@ -1267,6 +1267,7 @@ The possible values for this variable are
     ("with-open"       . ((:block 1)))
     ("with-precision"  . ((:block 1)))
     ("with-redefs"     . ((:block 1)))
+    ("defstruct"       . ((:block 1)))
     ("defrecord"       . ((:block 2) (:inner 1)))
     ("deftype"         . ((:block 2) (:inner 1)))
     ("are"             . ((:block 2)))
diff --git a/test/clojure-ts-mode-indentation-test.el 
b/test/clojure-ts-mode-indentation-test.el
index abe06ff7c8..2e27fbbb1c 100644
--- a/test/clojure-ts-mode-indentation-test.el
+++ b/test/clojure-ts-mode-indentation-test.el
@@ -252,7 +252,11 @@ DESCRIPTION is a string with the description of the spec."
 
     "
 (testing \"Something should work\"
-  (is (something-working?)))")
+  (is (something-working?)))"
+
+    "
+(defstruct employee
+  :name :id)")
 
   (when-indenting-it "should support block-2 expressions"
     "

Reply via email to