vim

Dumch 2023-06-06T19:41:37.535789Z

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

athomasoriginal 2023-06-07T11:24:23.011509Z

I just run zprint over it (outside of lsp)

Olical 2023-06-07T13:55:21.504229Z

Never liked it, personally ¯\(ツ)

Dumch 2023-06-08T08:20:03.088089Z

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

Phillip Mates 2023-06-08T12:49:34.929869Z

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
ericdallo 2023-06-06T19:50:44.406459Z

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

🙏🏻 1
ericdallo 2023-06-06T19:51:18.405509Z

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

Dumch 2023-06-06T20:10:35.752469Z

The same with cljstyle https://github.com/greglook/cljstyle/issues/47