emacs

Consider also joining #cider, #lsp and #inf-clojure, where most of the tool-specific discussions are happening.
borkdude 2021-05-02T11:11:28.198400Z

@dpsutton That did the trick!

(setq clojure-align-separator 'entire)
https://github.com/clj-kondo/clj-kondo.lsp/blob/master/bb.edn

Schmoho 2021-05-02T13:55:50.199700Z

I am currently trying out lsp-mode with clojure and I do somewhat like it so far, but what's driving me insane is that it won't align any forms, although align automatically is set to true

Schmoho 2021-05-02T13:55:56.199900Z

does anybody know how to fix that?

Schmoho 2021-05-02T13:57:55.200500Z

I've read it uses cljfmt internally and this should be configurable, but I couldn't find out how

ericdallo 2021-05-02T14:08:14.200600Z

Do you have lsp-enable-identation to t?

ericdallo 2021-05-02T14:08:40.200800Z

If so, you can just call lsp-format-buffer

Schmoho 2021-05-02T14:51:21.201Z

that does not align forms

ericdallo 2021-05-02T14:53:55.201200Z

what do you mean with align forms? like vertically?

ericdallo 2021-05-02T14:54:33.201400Z

If so, this is not possible with clojure-lsp yet because of https://clojurians.slack.com/archives/CHB5Q2XUJ/p1619891221242100

ericdallo 2021-05-02T14:54:53.201700Z

the onlyt possible way to do that is with clojure-align built-in in clojure-mode for emacs

mpenet 2021-05-02T15:08:19.202Z

I personally really dislike this kind of alignment. It's quite inconsistent between editors and when done manually it ends up full of random/personal rules. When working with code bases with many contributors it ends up quite messy in my experience.

mpenet 2021-05-02T15:09:02.202100Z

I also don't think it makes code more readable, but I get that part is personal.

➕ 1
mpenet 2021-05-02T15:10:49.202300Z

clj-fmt can enforce the "non justified" style too: :remove-multiple-non-indenting-spaces?

ericdallo 2021-05-02T15:19:28.202700Z

but cljfmt can't align forms vertically yet, right?

ericdallo 2021-05-02T15:20:07.202800Z

ref: https://github.com/weavejester/cljfmt/pull/77

mpenet 2021-05-02T15:50:15.203100Z

No it can't afaik