Fork me on GitHub
#calva
<
2019-10-25
>
pez06:10:28

@agold (and all Calva-friends, really): Here are the docs Calva w/o it’s own linting reporter and w/ clj-kondo bundled: https://calva.readthedocs.io/en/bundle-clj-kondo/index.html (the bundle-clj-kondo part of the URL is just pointing out the version of the docs, so the link is to the start page). These docs go with this README https://github.com/BetterThanTomorrow/calva/tree/bundle-clj-kondo. You can find the whole PR here: https://github.com/BetterThanTomorrow/calva/pull/426 and a VSIX package here: https://1577-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.54-bundle-clj-kondo-7369cf10.vsix

👍 4
borkdude06:10:47

Maybe this is interesting to add to the README for Windows users? https://twitter.com/borkdude/status/1187622954236071936

borkdude06:10:27

Maybe the clj-kondo extension can also emit this information on startup. I'll try this

pez07:10:46

Let’s see if I get this correctly. That is not needed for using the extension on Window’s, right? It is mainly a way to get a clj-kondo command working?

borkdude07:10:20

Since a user asked how to lint their entire classpath

pez07:10:34

Cool. I can add it to the linting page of Calva docs.

borkdude07:10:40

I'm not planning to support this in my clj-kondo extension (since it's not an IDE like Calva)

pez07:10:08

Where should I link for more info on this? (I’d like to keep it minimal in the Calva docs).

borkdude07:10:34

Docs are still to be added for the npm install. I'll make an issue for that

borkdude07:10:45

@filipematossilva just made it this week

pez07:10:03

If Calva can assist with linting the entire classpath/project, I’d like an issue about it.

borkdude07:10:13

does Calva know about the classpath?

borkdude07:10:44

linting the classpath only makes sense if you have a .clj-kondo directory

borkdude07:10:49

so it populates the cache

borkdude07:10:11

and then you can use this information while visiting files, then the clj-kondo extension will pick up on this

pez07:10:17

No, Calva doesn’t really know about the classpath. It might be able to inform itself about it via nREPL? In any case, I am not promising to add that support, but if I have an issue with some helpful info about what it entails, I’d at least have it on my radar.

pez07:10:34

Haha, you found it quickly! Can also be seen here: https://calva.readthedocs.io/en/bundle-clj-kondo/linting.html

borkdude07:10:07

pretty cool to finally have a good Windows story for clj-kondo

pez07:10:04

Yes, that is super nice. The whole Clojure story is getting better by that.

Filipe Silva15:10:34

I think I missed some context over the last day or so

Filipe Silva15:10:40

clj-kondo will be in calva now?

borkdude15:10:08

yeah, it's the lsp server-based solution

borkdude15:10:24

PEZ wanted something that works on all platforms

Filipe Silva15:10:43

is it there already? since you have docs it sounds like it is

borkdude15:10:11

I think those are the docs of the branch bundle-clj-kondo

Filipe Silva15:10:38

where does this clj-kondo+calva stand with clojure-lsp?

Filipe Silva15:10:07

I ask because you were inquiring with snoe on whether the two projects should join forces, at least on the lsp front

Filipe Silva15:10:15

would calva also run clojure-lsp?

borkdude16:10:10

clojure-lsp already has integration for emacs, so if clojure-lsp would integrate kondo, I wouldn't have to figure the emacs lsp stuff out and write a separate emacs package. there still could be one though, but my highest priority with the LSP stuff was VSCode since I suspect Clojurians on Windows would use mostly that

borkdude16:10:19

that's why I was asking snoe

Filipe Silva16:10:58

tbh as a vscode user it just sounds like christmas came early, all the tooling, zero hassle

calva 4
borkdude16:10:50

I don't know clojure-lsp and Calva well enough to say that it would be a good marriage, I'll leave that between snoe and PEZ 🙂

pez16:10:21

We haven’t had the time to investigate how Calva could leverage clojure-lsp. @slack1038 made a vscode extension using clojure-lsp, and it was quite mindblowing how all that Clojure IDE power just came pouring up from the server. There has also been some discussions in the Dev Tooling Task Force about using nREPL to start the server and then wether we should add a layer of nREPL api to it, for non-lsp clients.

pez16:10:32

I think a lot of that is a bit stuck today because everybody thinks there are two many ASTs built, in too many ways and that we want to solve that first. Just that we need a lot of time, and noone has a lot of time. lol

borkdude16:10:28

maybe actual benchmarks are better than worrying about too many ASTs 🙂

Filipe Silva16:10:45

I'll just ping @snoe directly since I was talking about him

borkdude16:10:52

but I understand the problem of integrating between multiple parties, that's always tricky and time consuming

Filipe Silva16:10:21

@pez do you know what that vscode extension is called?

pez16:10:39

Let me check…

Filipe Silva16:10:45

jeez, it didn't show up at all in my google searches

Filipe Silva16:10:12

ah, windows not working on it, but I am on windows 😞

pez16:10:32

It’s not? @slack1038 is a Windows user…

pez16:10:05

OK. so I see the commit message now. Well, it was just a very quick test. I don’t think the Windows story necessarily is closed.

Filipe Silva16:10:12

snoe also mentioned he needed help testing windows

Filipe Silva16:10:57

btw @pez wdyt of using npm releases of clj-kondo? is that helpful for you?

Filipe Silva16:10:21

e.g. if I downloaded and exposed the lsp server in the clj-kondo package as a bin

Filipe Silva16:10:29

or is that of no use to calva

pez16:10:53

I’m pretty happy with letting the clj-kondo extension do the linting. Maybe I don’t understand the question. 😃

Filipe Silva17:10:54

oh I didn't understand how it worked

Filipe Silva17:10:59

calva bundles the clj-kondo directly

pez17:10:48

Yeah. Or it will be, soon. 😎

borkdude17:10:09

Does Calva start a REPL session or does it also work without a running JVM?

pez17:10:16

Most of Calva's functionality needs a running REPL.

pez17:10:47

And Calva is pretty good at starting it for you. If I may say so, myself.

👍 4
borkdude17:10:34

In theory, the kondo LSP server could live in the same JVM process as the Calva REPL, so save one JVM instance. But then you could also have dependency conflicts or when your REPL crashes you would not have linting anymore

borkdude17:10:48

so that's a tradeoff

pez17:10:38

And also no linting until you have the repl. I think it could be pretty tricky to try start the repl inside a given jvm process.

borkdude17:10:18

I mean the other way around. Calva starts the REPL and inside that REPL launches the server.

borkdude17:10:41

but then you would still have no linting until you would have a REPL

pez17:10:42

Yeah, I got that.

borkdude17:10:55

I think we're good for now then

borkdude17:10:11

First make it work, then optimize

pez18:10:33

You sound like @slack1038 😃

pez18:10:54

I’m super happy with that the story now becomes Install Calva and you have excellent linting. It’s worth a java process.

❤️ 8
pez19:10:36

And Calva v2.0.54 is out. Bundling the clj-kondo extension. Many thanks to @borkdude for clj-kondo, the clj-kondo extension, and for going the extra mile to spark joy in VS Code land. ❤️

❤️ 12
calva 8
clj-kondo 12
borkdude22:10:44

PSA: I just fixed a bug in the borkdude.clj-kondo vscode extension. The server would not shutdown when you closed the editor or changed workspaces.

borkdude22:10:52

So killall java, upgrade an be happy 🙂 (fix version = 0.0.5)