Open rgkirch opened 3 years ago
Consider using clojure-align
instead (with a custom binding or with a wrapper around lispy-tab
).
Oh, just realized that lispy
already calls clojure-align
. Personally, I don't miss the other features from this command 1 so I'd just use the clojure one.
EDIT: it only calls clojure-align
is some specific clojure-mode opt is enabled.
Ok, thanks. That helps since I didn't know about clojure-align
but I'm not sure how to turn that into a solution.
Here's some untested code that might help:
(defun my-lispy-tab ()
(interactive)
(if (memq major-mode lispy-clojure-modes)
(call-interactively 'clojure-align)
(call-interactively 'lispy-tab)))
(lispy-define-key lispy-mode-map "i" 'my-lispy-tab)
Thanks for this! I think it's like you said; this leaves out some features but I'm happy so far and I've put it in my init.el.
#(+ %1 %2)
indented with special-lispy-tab ori
gives#(+ % 1 % 2)
which is not the same...(#(+ %1 %2) 1 2)
gives 3 while(#(+ % 1 % 2) 1 2)
gives 5