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
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
@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 π
@ericdallo Awesome, trying it out!
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
I already asked in #calva but that hasn't yielded much yet...
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
{:linters {:unused-namespace-declarations #{"src/thing/"}}}
https://github.com/clojure-lsp/clojure-lsp/blob/master/src/clojure_lsp/feature/diagnostics.clj#L28Yeah, this should work too π
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!
Is this the famous PR that has been pulled?
Yes! π π€
π
@ericdallo Maybe you should apply for Clojurists Together for the next quarter. :)
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 :)
That's exciting! thank you @lvh !
π
OMG. Congratulations!!!
Yeah! I already sent the form in December, but I have no idea if they received π
Thank you! We hope this help a lot resolving most issues π
You won't hear anything shortly before the quarter begins
But you can of course verify if they received it
I see, how can I confirm that? any clojurians channel?
mail them
or ask @lvh or @danielcompton
I sent them a message for you
and recommended you to them ;)
Oh, thank you very much @borkdude !
Of course I don't have any say in this, it's entirely up to the CT team, so π€
The fresh release of clojure-lsp works like a charm!
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?
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
I see! I wonder could this be improved a bit by using a sqlite db instead of raw files?
maybe not a priority, since nowadays 1k files is not a big deal on SSDs
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
clj-kondo writes one transit json file per analyzed namespace and has been doing so since almost the start
I looked into sqlite, etc, but these things didn't work with graalvm back then
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?
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.
@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
(also I am from the American Midwest so please keep in mind that "the other day" can mean 6 months ago)
hello it's me the person inexplicably left in charge of some dollars
(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)
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/
IMO, LSP works really nice for every programming language, even those heavy oriented by REPL
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 π
it's definitely complimentary though, no one's asking you to throw out your repl if you use clojure-lsp
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
cool thanks, super weird that spacemacs does it that way π
yeah, doom-emacs allows that, maybe it'd be a goo idea to open an issue on spacemacs about that π
I very much agree with this!
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.