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
I think you can just disable the extension?
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.
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.
That would be more general since then one could have different configs to toggle between.
:thumbsup:
What is not accessible about disabling the extension?
I'm going to say that in the issue as well, so you might save yourself some energy ;)
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
Ah, if you try to disable it, VSCode complains about Calva. But you can disable all plugins with a shortcut I think
Well, in that case a shortcut might be justified. Make an issue in the repo
@mail985 An alternative: is it only one buffer at a time you'd like to do this?
Then you might do it via namespace local config
or disable everything in .clj-kondo/config.edn
with ^:replace {:linters {}}
This is a misconfiguration in Calva. Fixed in the dev version.
Could you enlighten me what the fix was?
Removing an extension dependency on your extension. It should just be bundled.
Ah, gotcha.
OK, @pez informed me that clj-kondo can be disabled in a future version of Calva
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โฆ.
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
clojure-lsp is now also absorbing/using clj-kondo as a lib
Maybe we should absorb clojure-lsp as a lib.
That would be even more major
Absorbing it as an LSP server was too crazy anyway. ๐
I mean: Calva starts the LSP server, without relying on another extension
and then you can hack the LSP server any way you want, hook it to commands to do analysis, etc
e.g.: no need for a REPL to navigate or autocomplete (see anakondo for emacs)
Yeah, thatโs what the clojure-lsp PR-WIP was about. Going static and then enhance things with the REPL.
Yeah, definitely want to do that in the (maybe near?) future ^
I created a fresh project with lein new luminus <projectname> +swagger
and tried to jack-in from vscode but ended up with this error message: did someone come accross this one yet?
Not seen it. Does things still work after it happens?
No, it kinda got stuck there ๐
It was a simple Leiningen jack-in attempt
I'll try again with a new setup and maybe once again without +swagger
Very strange. I'll try the same template and see what happens. (But a bit later, I have to run here.)
Sadly the error message didn't tell me much
Yea, tried fresh with the same - happened again. Now I'll try without +swagger
It seems to say that Calva does something wrong. But it is strange...
Happens with a new lein new luminus <projectname>
too ๐
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/
Just to go totally sure I tried lein new app <projectname>
that one works ๐
I'll give it a look ๐ thanks for the reference
Hmm interesting... I got a totally different choice of project types than you in the editor. I wonder where they are taken from?
@pez Ah... bollocks... luminus released template version 3.84 yesterday. 3.83 worked, 3.84 not anymore...
The only mentionable change is the upgrade of luminus-http-kit
from 0.1.7 to 0.1.8
Changes: https://github.com/luminus-framework/luminus-http-kit/commit/94c799023bccdbc1469b8afec45bc92a988b9ece
I'm guessing very old versions of cider-nrepl would not work on newer nREPL, but without seeing some more error details it's hard to say.
So far only one issue has been discovered in nREPL 0.8 itself - https://github.com/nrepl/nrepl/issues/206 (but I doubt that's related to your problem)
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)
@esp1 it is being worked on. See some messages above, where @brandon.ringe is asking for help testing hit. โค๏ธ
ok cool thanks!
Thanks for reporting back! Let's holler at @yogthos, and wee if he can shed some light on this (pun intended).
oh so that was added based on this issue https://github.com/luminus-framework/luminus-template/issues/506
but I don't tend to use http-kit myself, so if that's not correct I'm open to changing that
Calva is using pretty ancient cider-nrepl versions. I wonder if that could be the issue... What you say, @bozhidar?
I had a little hunch - @yogthos http-kit change is not the problem. The update of nrepl
from 0.7.0
to 0.8.0
is. I was first not sure if that change made it in the 3.84 release but it seems it did. Downgrading nrepl
to 0.7.0
fixes this error.
But if you use jack-in, then Calva should inject version 0.6.0
, and I thought that would override any project setting...
Hmmm thats weird... cause I only change [nrepl "0.8.0"]
to [nrepl "0.7.0"]
in project.clj
and it works
Also, it doesn't work when triggering the command from the command line directly.
It works however if I remove this part: -- update-in :plugins conj '[cider/cider-nrepl"0.23.0"]'
We should pobably add a calva-jack-in
option to the Luminus template. Which doesn't add the editor dependencies to the project.
interesting, I'm open to roll back nrepl for now if that'd help, but would be nice to get things working with the latest
Still ironing out some things with the last vsix I posted, but will post another soon.
A fresh new cut of the repl history is ready for testing: https://7555-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.120-fix-740-allow-default-esc-keybind-feature-add-repl-history-e83cb315.vsix
In this version:
โข alt+up/down
should only traverse history if the cursor is past the last content in the doc (ignoring whitespace), otherwise these shortcuts map to what they were before, default is move line up/down
โข If you start typing some test and then start traversing up the history, that text will be there when you traverse back down the history (though it's not saved to history unless evaluated)
โข If, while traversing the history, you make an edit to a history entry and then keep traversing the history, the edit will be saved in history
@esp1 @glebovmaksim and anyone else, testing is appreciated
Thatโs me who has strong opinions to the contrary. I want the editing to be as close to the usual files as it possibly can.
Yeah, I had it that way before ๐
I'll check on that difference you mentioned with up/down
Yeah I normally don't use move line up/down when editing clojure, but @pez does, so this effects his editing of the last form, and I imagine some other users do this too.
A quick page-down, alt+up
works though if you're in the last form and not after it
Hey, are you outing me as a non-structural heretic! ๐ Haha, yes, I must plead guilty as charged in this case.
@esp1 For me, alt+up works to move a line up in a multi-line form. If you can capture maybe a gif and create an issue of your scenario, that would be helpful.
There might be a slight bias on my part to it, but really, this is about keeping the editing as regular-file-like as possible. Not just on principle, we have seen where the path of a special REPL editor leads...
Sweet gif! Bound to cause a heart attack on some structural purists. ๐
I agree, this way makes it more friendly to everyone I think, since you can quickly jump to the end of the form to navigate up in history, and once you navigate, the cursor will be after the form anyway
Hereโs what Iโm seeing:
No idea why this is happening for you :thinking_face: . What OS?
Does move line up work above the prompt for you? And in other files?
@pez do you experience this on Mac?
Iโm on macOS Catalina 10.15.5
On my machine (Catalina 10.15.2) it works exactly as advertised.
Does alt+up/down work in other files for you, @esp1?
Like, could it be this problem? https://calva.io/quirks/#macos-and-the-slurp-and-barf-keyboard-shortcuts
FYI I tracked this down to a spurious user keybinding. I removed it and all is working well. Thanks!
Awesome!
great, will try it out! thx!