Fork me on GitHub
#calva
<
2020-08-13
>
Jack Arrington12:08:38

Any way to toggle cljs-kondo off? It's super helpful (thanks @borkdude :)) but I personally find it distracting to have a linter running when I'm just trying to hash out an idea. If there's some way to bind it to a shortcut for flipping it on/off that would be swell

borkdude12:08:48

I think you can just disable the extension?

pez12:08:25

File that as an issue on the clj-kondo extension repo, I think it is a good idea. Disabling the extension is not accessible enough, imo.

pez12:08:18

There might be some other extension that allows for switching in and out files. Maybe investigate that first and we can write about it in the Calva docs.

pez12:08:15

That would be more general since then one could have different configs to toggle between.

borkdude12:08:20

What is not accessible about disabling the extension?

borkdude12:08:51

I'm going to say that in the issue as well, so you might save yourself some energy ;)

Jack Arrington12:08:46

I don't if there's a way to configure disabling/enabling the extension to a keyboard shortcut or command palette command, which is what I'd like to do. I don't want to turn off clj-kondo completely, just enable/disable it at will. But I am Sublime Text refugee and don't know my way around VSCode very well yet, so @pez can fill us in if there's some way to do that

borkdude12:08:52

Ah, if you try to disable it, VSCode complains about Calva. But you can disable all plugins with a shortcut I think

pez12:08:52

This is a misconfiguration in Calva. Fixed in the dev version.

borkdude12:08:28

Could you enlighten me what the fix was?

pez12:08:33

Removing an extension dependency on your extension. It should just be bundled.

borkdude13:08:07

Ah, gotcha.

borkdude12:08:11

Well, in that case a shortcut might be justified. Make an issue in the repo

borkdude12:08:31

@mail985 An alternative: is it only one buffer at a time you'd like to do this?

borkdude12:08:49

Then you might do it via namespace local config

borkdude12:08:59

or disable everything in .clj-kondo/config.edn

borkdude12:08:22

with ^:replace {:linters {}}

borkdude13:08:28

OK, @pez informed me that clj-kondo can be disabled in a future version of Calva

pez13:08:08

So that config thing was what I meant with maybe see if some other extension can help with it. Switching in and out .clj-kondo/config.edn variants….

borkdude13:08:48

Btw, since Calva is using clj-kondo as a JVM dependency as well, I think I wouldn't mind if Calva absorbed the clj-kondo LSP server in its own plugin, so it can also be made as a service for other things than diagnostics

borkdude13:08:19

clojure-lsp is now also absorbing/using clj-kondo as a lib

pez13:08:55

Maybe we should absorb clojure-lsp as a lib.

borkdude13:08:05

That would be even more major

pez13:08:29

Absorbing it as an LSP server was too crazy anyway. 😃

borkdude13:08:52

I mean: Calva starts the LSP server, without relying on another extension

borkdude13:08:16

and then you can hack the LSP server any way you want, hook it to commands to do analysis, etc

borkdude13:08:41

e.g.: no need for a REPL to navigate or autocomplete (see anakondo for emacs)

pez13:08:38

Yeah, that’s what the clojure-lsp PR-WIP was about. Going static and then enhance things with the REPL.

bringe16:08:14

Yeah, definitely want to do that in the (maybe near?) future ^

alpox16:08:13

I created a fresh project with lein new luminus +swagger and tried to jack-in from vscode but ended up with this error message: did someone come accross this one yet?

pez16:08:20

Not seen it. Does things still work after it happens?

alpox16:08:46

No, it kinda got stuck there 🙂

alpox16:08:04

It was a simple Leiningen jack-in attempt

alpox16:08:26

I'll try again with a new setup and maybe once again without +swagger

pez16:08:27

Very strange. I'll try the same template and see what happens. (But a bit later, I have to run here.)

alpox16:08:31

Sadly the error message didn't tell me much

alpox16:08:55

Yea, tried fresh with the same - happened again. Now I'll try without +swagger

pez16:08:55

It seems to say that Calva does something wrong. But it is strange...

alpox16:08:45

Happens with a new lein new luminus <projectname> too 😞

pez16:08:46

I don't think you are doing anything wrong. It is extra strange because I've worked a bit with making things smooth with Luminus. See https://calva.io/luminus/

alpox16:08:02

I'll give it a look 🙂 thanks for the reference

alpox16:08:23

Just to go totally sure I tried lein new app <projectname> that one works 😄

alpox16:08:55

Hmm interesting... I got a totally different choice of project types than you in the editor. I wonder where they are taken from?

esp118:08:57

How do I navigate history in the Calva output.repl-file window? Alt+Up/Down doesn’t work - it’s moving the text line at the cursor up or down instead (Calva 2.0.119)

pez18:08:00

@esp1 it is being worked on. See some messages above, where @brandon.ringe is asking for help testing hit. ❤️

esp118:08:19

ok cool thanks!

bringe22:08:06

Still ironing out some things with the last vsix I posted, but will post another soon.

👍 1