vim 2023-06-06

Does anyone have binding alignment in let and map ? What do you use? Do you know if it's possible to make LSP do it for you (`vim.lsp.buf.format`)? Example:

(let [a   1
      abc 2
      d   3])

I just run zprint over it (outside of lsp)

Never liked it, personally ¯\(ツ)/¯

When I have to extend others code with this alignment, I have to press spaces a lot. Wanted to automate this routine.

https://github.com/junegunn/vim-easy-align works alright (sometimes it gets confused formatting nested sequences/maps) with it I ctrl-v and visually select the region to format and then type gaip<space>

🙏 1

Via LSP no, clojure-lsp uses cljfmt ATM and cljfmt doesn't support vertical alignment yet

🙏🏻 1

There is https://github.com/weavejester/cljfmt/pull/299 though that is almost there 😂