Closed ahungry closed 4 years ago
Thanks for the pull request. Can you provide an example what what this changes? The current code seems to produce reasonable indentation in many cases, at least. For example from the docs:
(def my-struct {:key1 2
:key2 4})
(def my-struct2 (struct
:key1 2
:key2 4))
Is indented the same as it is shown in the docs.
If you call (indent-sexp) on a top level map, I was getting odd alignment:
{:x 1
:y 2
}
It happens with indent-sexp, the tab based alignment was fine, but align-sexp calls the lisp-indent, which is redefined to be a special alignment in clojure mode, but was missing here
(The program i use that often invokes align-sexp, as its an odd one to call by hand, is lispy)
Its because indent-sexp would calculate the offset according to how elisp/common lisp/scheme would handle indentation:
(list :x 1
:y 2)
where it makes sense to disregard the first thing-at-point after the data structure start
Fixes the poor alignment of struct/table keys