guns/vim-clojure-static

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

boechat107 opened this issue · 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?

guns commented

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 :)

Thanks for replying, @guns!

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

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