lsp

:clojure-lsp: Clojure implementation of the Language Server Protocol: https://clojure-lsp.io/
plexus 2021-01-22T06:01:27.024300Z

I'm using VS Code/Calva, I'd like to disable linting completely. Any suggestions on how to do that? I've tried various things with .clj-kondo/config.edn and .lsp/config.edn, but I'm still getting unused var and namespace warnings

ericdallo 2021-01-22T11:55:30.025900Z

Yes @plexus ATM there is no way to disable clojure-lsp warnings, but this is about to change, I'll merge a huge refactor PR that will use kondo 100% for everything https://github.com/clojure-lsp/clojure-lsp/pull/261

Lucy Wang 2021-01-22T14:42:23.036600Z

@plexus I used to comment out the features I don't need from the source code and lein bin to get a customized version of clojure-lsp πŸ™‚

Lucy Wang 2021-01-22T14:42:34.036800Z

@ericdallo Awesome, trying it out!

🀘 1
plexus 2021-01-22T14:43:42.037200Z

thanks @wxitb2017, I did essentially that for now. We're also discussing a potential more thorough approach for Calva here: https://github.com/BetterThanTomorrow/calva/pull/981

plexus 2021-01-22T06:02:07.025Z

I already asked in #calva but that hasn't yielded much yet...

plexus 2021-01-22T06:06:51.025800Z

looking at the code it seems these are actually coming from clojure-lsp itself rather than condo, which would explain why the config doesn't have any effect

clyfe 2021-01-22T12:05:08.026500Z

{:linters {:unused-namespace-declarations #{"src/thing/"}}}
https://github.com/clojure-lsp/clojure-lsp/blob/master/src/clojure_lsp/feature/diagnostics.clj#L28

ericdallo 2021-01-22T12:05:34.026800Z

Yeah, this should work too πŸ™‚

ericdallo 2021-01-22T13:21:20.031900Z

Released https://github.com/clojure-lsp/clojure-lsp/releases/tag/2021.01.22-13.04.28 of clojure-lsp with a lot of changes/fixes πŸŽ‰ This release removes clojure-lsp parsing knowledge replaced by clj-kondo analysis/findings output. β€’ Should significantly increase performance and startup time β€’ Should fix almost all bugs/issues with windows Users since we now rely on clj-kondo analysis β€’ RemoveΒ all lint configs fromΒ `clojure-lsp`Β includingΒ `macro-defs`, they should be configured onΒ `clj-kondo`Β side now viaΒ `.clj-kondo/config.edn` β€’ Move file path on documentation to bottom For more info, check https://clojure-lsp.github.io/clojure-lsp/. It was a huge refactor on clojure-lsp, so any bugs/issues reports are very welcome. Thanks for the huge help of @snoe who made this possible and @borkdude for all the support from clj-kondo side!

4
πŸŽ‰ 4
pez 2021-01-22T13:25:31.032400Z

Is this the famous PR that has been pulled?

ericdallo 2021-01-22T13:25:47.032500Z

Yes! πŸ˜„ 🀞

borkdude 2021-01-22T13:26:52.032800Z

πŸŽ‰

πŸŽ‰ 5
borkdude 2021-01-22T13:30:04.033300Z

@ericdallo Maybe you should apply for Clojurists Together for the next quarter. :)

1
lvh 2021-01-26T22:40:44.109400Z

I see one application from you for January 3rd, we definitely got it; we just don't send full feedback until we've voted on a batch, so yeah you should expect it close to next quarter :)

ericdallo 2021-01-26T22:41:37.109600Z

That's exciting! thank you @lvh !

borkdude 2021-01-26T22:41:53.109800Z

πŸŽ‰

2
pez 2021-01-22T13:32:03.033400Z

OMG. Congratulations!!!

ericdallo 2021-01-22T14:16:58.033900Z

Yeah! I already sent the form in December, but I have no idea if they received πŸ˜…

ericdallo 2021-01-22T14:18:08.034200Z

Thank you! We hope this help a lot resolving most issues πŸ˜„

borkdude 2021-01-22T14:18:30.034400Z

You won't hear anything shortly before the quarter begins

borkdude 2021-01-22T14:18:52.034600Z

But you can of course verify if they received it

ericdallo 2021-01-22T14:20:46.034800Z

I see, how can I confirm that? any clojurians channel?

borkdude 2021-01-22T14:22:05.035100Z

mail them

borkdude 2021-01-22T14:22:19.035300Z

or ask @lvh or @danielcompton

borkdude 2021-01-22T14:24:35.035500Z

I sent them a message for you

borkdude 2021-01-22T14:24:39.035700Z

and recommended you to them ;)

ericdallo 2021-01-22T14:25:59.035900Z

Oh, thank you very much @borkdude !

borkdude 2021-01-22T14:26:29.036100Z

Of course I don't have any say in this, it's entirely up to the CT team, so 🀞

😝 1
1
Lucy Wang 2021-01-22T14:49:49.038300Z

The fresh release of clojure-lsp works like a charm!

3
πŸŽ‰ 2
Lucy Wang 2021-01-22T14:51:02.039500Z

btw I find there are almost 1k new files under .clj-kondo/.cache , I guess it's because all deps are scanned using clj-kondo as a lib?

ericdallo 2021-01-22T14:53:33.039700Z

Yep, exactly, we don't have anymore a .lsp/.clj-kondo , it's now .clj-kondo and it contains in .cache all analysis cache from clj-kondo

πŸ‘Œ 1
Lucy Wang 2021-01-22T14:54:41.040100Z

I see! I wonder could this be improved a bit by using a sqlite db instead of raw files?

Lucy Wang 2021-01-22T14:54:51.040300Z

maybe not a priority, since nowadays 1k files is not a big deal on SSDs

ericdallo 2021-01-22T15:00:42.040800Z

Not sure, this is done by clj-kondo we have no control over that AFAIK, not sure it's a issue too since for example, for clojure-lsp project the size of that dir is about 9mb , but @borkdude may know more about it

borkdude 2021-01-22T15:28:19.041Z

clj-kondo writes one transit json file per analyzed namespace and has been doing so since almost the start

borkdude 2021-01-22T15:28:38.041200Z

I looked into sqlite, etc, but these things didn't work with graalvm back then

1
lvh 2021-01-22T16:58:21.044700Z

Hi! I enabled the Spacemacs lsp layer for Rust the other day and accidentally became a clojure-lsp user πŸ˜„ FWIW Spacemacs seems to feel pretty strongly that you're either using cider or lsp but not both; looking at the features and placement it feels like they should be somewhat complementary? lsp is going to be way faster (definitely in startup, probably in general), but there are some features that are going to be effectively impossible to do with a static approach, so they seem really complementary. does that sound right to you or am I misunderstanding clojure-lsp?

Jakub Zika 2021-01-23T08:02:43.052400Z

What conflicts do you mean? I moved to Spacemacs with Cider + lsp-mode month ago and I did not experience any issue yet. Edit: did i just find one @lvh? Namespace is not filled automatically when creating a new file in a project.

lvh 2021-01-26T22:42:16.110100Z

@jakub.zika-extern It's not a conflict in the sense of broken per se, just that it wants to use one or the other, so, suddenly CIDER disappeared on me

lvh 2021-01-26T22:42:45.110300Z

(also I am from the American Midwest so please keep in mind that "the other day" can mean 6 months ago)

😁 1
lvh 2021-01-22T16:59:02.044800Z

hello it's me the person inexplicably left in charge of some dollars

lvh 2021-01-22T16:59:25.045Z

(it's actually not just me, there's a whole committee, but I'm the president, which mostly means daniel and I get to file annoying paperwork)

ericdallo 2021-01-22T17:01:03.045200Z

what a curious approach to meet clojure-lsp hahah Yes, you are right, and I try to make that clear on this tutorial, that may help you πŸ™‚ https://emacs-lsp.github.io/lsp-mode/tutorials/clojure-guide/

ericdallo 2021-01-22T17:01:46.045500Z

IMO, LSP works really nice for every programming language, even those heavy oriented by REPL

ericdallo 2021-01-22T17:17:22.045700Z

haha thanks for your time checking that, I applied to Clojurists Together mid December If I recall correctly, I just don't received any feedback if it was sent correctly, but I think as @borkdude said, I may receive a feedback close to the next quarter πŸ˜ƒ

snoe 2021-01-22T17:50:15.046Z

it's definitely complimentary though, no one's asking you to throw out your repl if you use clojure-lsp

2
ericdallo 2021-01-22T17:51:50.046300Z

Yes, I use clojure-lsp with cider for almost a year, after you solve some conflicts between lsp-mode and cider they really work very well together

lvh 2021-01-22T18:06:02.046500Z

cool thanks, super weird that spacemacs does it that way πŸ™‚

ericdallo 2021-01-22T18:06:41.046700Z

yeah, doom-emacs allows that, maybe it'd be a goo idea to open an issue on spacemacs about that πŸ˜‰

bringe 2021-01-22T22:08:49.047200Z

I very much agree with this!

❀️ 1
bringe 2021-01-22T22:15:07.048Z

Indeed, Calva uses cider-nrepl and clojure-lsp together as complimentary tools. It's fairly easy, at least with our setup, to pick what we want from each, and in places where things overlap, we choose which to use based on which works better for the task, basically.