Fork me on GitHub
#lsp
<
2023-11-09
>
timo10:11:16

Is there a way to show trailing whitespace with clojure-lsp? I am seeing warnings of that kind in lua and python but not in clojure...

delaguardo13:11:32

usually this is provided by the editor

☝️ 1
borkdude16:11:29

there is an issue for this in clj-kondo, https://github.com/clj-kondo/clj-kondo/issues/1852 I think the issue should really be called :trailing-whitespace maybe with some config options. feel free to provide some feedback there

markbastian18:11:42

Is there a way to export the lsp’s effective .cljfmt.edn file? I’m trying to write a pre-commit hook for formatting and clojure-lsp format --filenames $STAGED is very slow to start. Was hoping to be able to export the config and just run cljfmt with the standalone config.

ericdallo19:11:25

you can get that from a running clojure-lsp, but then that doesn't make sense if performance is the problem.

ericdallo19:11:36

maybe we could improve performance of that

markbastian21:11:55

That would be cool. It would be great to use all the lsp goodies as a pre-commit hook eventually.

1
ericdallo21:11:24

one thing we do during format task is to https://github.com/clojure-lsp/clojure-lsp/blob/84aba99a8348cc854e14b406420d0f54fe27b7fa/lib/src/clojure_lsp/internal_api.clj#L359 for analysis to avoid inconsistency, but we don't really use analysis for format, so maybe that would make the same as calling cljfmt

👍 1
ericdallo21:11:55

there is specific things about checking :style meta that we use analysis, but that's a really specific feature, so not sure that would be a big deal

pesterhazy08:11:57

Add me to the list of ppl who have wanted fast cljfmt via clojure-lsp for a long time

ericdallo12:11:15

Feel free to create a issue about the performance, would be nice to have a comparassion like: cljfmt takes x and clojure-lsp y for this file

👍 1