I just published vim-iced 0.13.0! https://github.com/liquidz/vim-iced
Someone said they were using vim-cljfmt and it didn't preserve marks. https://github.com/sbdchd/neoformat claims to do so, and should be easy enough to hook up.
Hmm, that's strange. Marks are usually attached to text, not like numbers.
It doesn't seem to support formatting clojure 😞 It's not listed in the readme and I'm getting
Neoformat: formatter not defined for clojure filetype
Ah I can set up custom formatters... I'll try to set it up with cljfmt
Mmm I hooked it up with cljfmt through a script that calls my socket-repl (to reuse the running JVM). A bit hacky but seems to work nicely, it keeps marks as promised. Thanks for the tip @dominicm 👍
Make sure to document it somewhere for others!
What did vim-cljfmt do BTW?
What do you mean?
If neoformat could be set up to run a vim command (ie. use vim-fireplace like vim-cljfmt does, I guess that's what you meant) instead of needing an executable do the formatting, I could ditch the script and the socket-repl, that would be much nicer. The setup with a socket-repl is a bit convoluted.
Sadly neoformat doesn't handle the issue where marks will "shift" when some previous lines are collapsed during formatting. Marks stay at the same line numbers, but it may be different code.