vim-clojure-static icon indicating copy to clipboard operation
vim-clojure-static copied to clipboard

Wrong indentation for ``->>`` inside a ``letfn``

Open boechat107 opened this issue 10 years ago • 3 comments

I'll just copy/paste an example:

(let [x (fn [y] 1)]
  (->> "ola" 
       (x)))

(letfn [(x [y] 1)]
  (->> "ola" 
    (x)))

Is it clear?

boechat107 avatar Nov 03 '14 16:11 boechat107

Yes, thank you for reporting!

This is definitely a shortcoming in the indentation algorithm for letfn, and other "specially" indented forms.

I have been out of the Clojure loop for a few months now, but I am planning on revisiting and fixing issues when a 1.7.0 beta drops, and I will make sure to finally fix this bug as well.

Patches are definitely welcome in the meantime, if you can stomach a little Vimscript :)

guns avatar Nov 03 '14 20:11 guns

Thanks for replying, @guns!

I'll try to find some time to look at the code.

boechat107 avatar Nov 04 '14 00:11 boechat107

I just stumbled over this as well. Have you already been able to locate the problem?

rkoch avatar Jul 15 '15 17:07 rkoch