Fork me on GitHub
#lsp
<
2021-12-31
>
Chase15:12:20

If I want to configure the clojure-lsp format rules do I follow the instructions detailed in the cljfmt repo?

Chase15:12:28

It's just a minor thing but I like to have a trailing comma at the end of my rich comments like:

(comment
  (foo)
  ,)
and the formatter deletes that last line.

ericdallo15:12:50

Yes, if that is possible with cljfmt it should be able to configure under the :cljfmt setting

ericdallo15:12:59

Or via a cljfmt file on project root

ericdallo15:12:04

A .cljfmt.edn file

Chase15:12:17

Awesome, I just found that page actually. I'm going to make it global once I figure out how. Haha

practicalli-johnny22:12:20

I use a snippet to create a rich comment blovk that includes a #_() (I assume for the same reason as using ,) before the closing paren to prevent cljfmt from moving the closing paren. If there is a way to configure cljfmt to not move the closing paren, I would be very interested to know.

Chase01:01:18

Ahh, looks like I'll use that method if no other solution is found. Thanks.

Chase01:01:22

I asked on the #cljfmt channel too but we might be out of luck here