Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## main (unreleased)

- Fix indentation of namespaced maps in `fixed` indentation style.
- Add project root detection for ClojureCLR project.
- Add missing `defstruct` semantic indentation rule.
- Fix font-lock issues: duplicate query, missing `definline` metadata docstring.
Expand Down
9 changes: 5 additions & 4 deletions clojure-ts-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -1219,10 +1219,11 @@ The possible values for this variable are
(let ((first-child (treesit-node-child parent 0 t)))
(clojure-ts--symbol-node-p first-child))))
parent 2)
((parent-is "vec_lit") parent 1)
((parent-is "map_lit") parent 1)
((parent-is "list_lit") parent 1)
((parent-is "set_lit") parent 2))))
((parent-is "^vec_lit$") parent 1)
((parent-is "^map_lit$") parent 1)
((parent-is "^list_lit$") parent 1)
((parent-is "^set_lit$") parent 2)
((parent-is "^ns_map_lit$") (nth-sibling 2) 1))))

(defvar clojure-ts--semantic-indent-rules-defaults
'(("alt!" . ((:block 0)))
Expand Down
7 changes: 6 additions & 1 deletion test/clojure-ts-mode-indentation-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,12 @@ DESCRIPTION is a string with the description of the spec."
[clojure.string :as str])
(:import
(java.util Date
UUID)))"))
UUID)))")

(when-indenting-fixed-it "should indent namespaced maps correctly"
"
#:foo{:bar 1
:baz 2}"))

(describe "clojure-ts-align"
(it "should handle improperly indented content"
Expand Down
Loading