Fork me on GitHub
#vim
<
2016-10-17
>
dominicm15:10:17

@snoe I was trying to figure out how to reformat the threading forms automatically, but I don't think my use of mark-position worked. Any guidance on where to put it / how to do it?

snoe16:10:40

so by default after a transform, the final transform position is automatically marked, https://github.com/clojure-vim/clj-refactor.nvim/blob/master/src/clj_refactor/main.cljs#L61 mark-position should really only be used when modifying a different top-level form than the cursor's. So I think thread-sym https://github.com/clojure-vim/clj-refactor.nvim/blob/master/src/clj_refactor/transform.cljs#L152 could end with a z/up (pointing to the form containing the thread-sym) (and the recur in thread-all adjusted if necessary https://github.com/clojure-vim/clj-refactor.nvim/blob/master/src/clj_refactor/transform.cljs#L167)

dominicm16:10:56

@snoe: Is the final position currently the -> or something like that currently?

snoe16:10:58

I think it's to the right of the ->

dominicm16:10:07

heh, makes sense.

snoe16:10:32

well, I think I just didn't care where it ended

dominicm16:10:58

I mean, it makes sense why the format isn't taking place. There's no reason you would have cared when it was originally written.