Fork me on GitHub
#emacs
<
2021-05-02
>
borkdude11:05:28

@dpsutton That did the trick!

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

Schmoho13:05:50

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

Schmoho13:05:56

does anybody know how to fix that?

Schmoho13:05:55

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

ericdallo14:05:14

Do you have lsp-enable-identation to t?

ericdallo14:05:40

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

Schmoho14:05:21

that does not align forms

ericdallo14:05:55

what do you mean with align forms? like vertically?

ericdallo14:05:33

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

ericdallo14:05:53

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

mpenet15:05:19

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.

mpenet15:05:02

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

3
mpenet15:05:49

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

ericdallo15:05:28

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

mpenet15:05:15

No it can't afaik