vim

For discussion on all things (neo)vim.
2019-11-29T11:34:52.490900Z

I just published vim-iced 0.13.0! https://github.com/liquidz/vim-iced

1
❤️ 3
dominicm 2019-11-29T14:00:24.491200Z

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.

dominicm 2019-11-30T08:18:05.494Z

Hmm, that's strange. Marks are usually attached to text, not like numbers.

Jan K 2019-11-29T18:40:17.491700Z

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

Jan K 2019-11-29T18:43:51.491900Z

Ah I can set up custom formatters... I'll try to set it up with cljfmt

Jan K 2019-11-29T19:20:43.492200Z

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 👍

dominicm 2019-11-29T19:21:35.492400Z

Make sure to document it somewhere for others!

dominicm 2019-11-29T19:21:50.492600Z

What did vim-cljfmt do BTW?

Jan K 2019-11-29T19:22:38.492800Z

What do you mean?

Jan K 2019-11-29T19:23:12.493Z

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.

Jan K 2019-11-29T23:02:37.493800Z

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.