calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
Jack Arrington 2020-08-13T12:26:38.258700Z

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

borkdude 2020-08-13T12:28:48.259200Z

I think you can just disable the extension?

pez 2020-08-13T12:29:25.259900Z

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.

pez 2020-08-13T12:30:18.260800Z

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.

pez 2020-08-13T12:31:15.261400Z

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

Jack Arrington 2020-08-13T12:38:27.261600Z

:thumbsup:

borkdude 2020-08-13T12:41:20.261900Z

What is not accessible about disabling the extension?

borkdude 2020-08-13T12:41:51.262300Z

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

Jack Arrington 2020-08-13T12:44:46.264300Z

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

borkdude 2020-08-13T12:46:52.264900Z

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

borkdude 2020-08-13T12:47:11.265300Z

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

borkdude 2020-08-13T12:48:31.265700Z

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

borkdude 2020-08-13T12:49:49.265900Z

Then you might do it via namespace local config

borkdude 2020-08-13T12:49:59.266200Z

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

borkdude 2020-08-13T12:50:22.266700Z

with ^:replace {:linters {}}

pez 2020-08-13T12:56:52.266800Z

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

borkdude 2020-08-13T12:57:28.267Z

Could you enlighten me what the fix was?

pez 2020-08-13T12:59:33.267200Z

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

borkdude 2020-08-13T13:00:07.267600Z

Ah, gotcha.

borkdude 2020-08-13T13:00:28.268400Z

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

pez 2020-08-13T13:01:08.269100Z

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โ€ฆ.

borkdude 2020-08-13T13:09:48.270600Z

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

borkdude 2020-08-13T13:10:19.270900Z

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

pez 2020-08-13T13:10:55.271300Z

Maybe we should absorb clojure-lsp as a lib.

borkdude 2020-08-13T13:11:05.271500Z

That would be even more major

pez 2020-08-13T13:11:29.272300Z

Absorbing it as an LSP server was too crazy anyway. ๐Ÿ˜ƒ

borkdude 2020-08-13T13:11:52.272700Z

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

borkdude 2020-08-13T13:12:16.273100Z

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

borkdude 2020-08-13T13:12:41.273500Z

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

pez 2020-08-13T13:13:38.274400Z

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

bringe 2020-08-13T16:04:14.275300Z

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

alpox 2020-08-13T16:40:13.277Z

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?

pez 2020-08-13T16:42:20.277600Z

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

alpox 2020-08-13T16:42:46.277800Z

No, it kinda got stuck there ๐Ÿ™‚

alpox 2020-08-13T16:43:04.278400Z

It was a simple Leiningen jack-in attempt

alpox 2020-08-13T16:45:26.279400Z

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

pez 2020-08-13T16:45:27.279600Z

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

alpox 2020-08-13T16:45:31.279700Z

Sadly the error message didn't tell me much

alpox 2020-08-13T16:45:55.280500Z

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

pez 2020-08-13T16:45:55.280600Z

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

alpox 2020-08-13T16:47:45.281200Z

Happens with a new lein new luminus &lt;projectname&gt; too ๐Ÿ˜ž

pez 2020-08-13T16:49:46.282800Z

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/

alpox 2020-08-13T16:50:23.283300Z

Just to go totally sure I tried lein new app &lt;projectname&gt; that one works ๐Ÿ˜„

alpox 2020-08-13T16:51:02.283400Z

I'll give it a look ๐Ÿ™‚ thanks for the reference

alpox 2020-08-13T16:57:55.284Z

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

alpox 2020-08-13T17:09:12.286400Z

@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

bozhidar 2020-08-16T17:33:44.015400Z

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.

bozhidar 2020-08-16T17:34:34.015600Z

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)

esp1 2020-08-13T18:18:57.287600Z

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)

pez 2020-08-13T18:29:00.289300Z

@esp1 it is being worked on. See some messages above, where @brandon.ringe is asking for help testing hit. โค๏ธ

esp1 2020-08-13T18:29:19.289500Z

ok cool thanks!

pez 2020-08-13T18:53:47.289600Z

Thanks for reporting back! Let's holler at @yogthos, and wee if he can shed some light on this (pun intended).

yogthos 2020-08-13T18:55:32.289800Z

oh so that was added based on this issue https://github.com/luminus-framework/luminus-template/issues/506

yogthos 2020-08-13T18:56:27.290100Z

but I don't tend to use http-kit myself, so if that's not correct I'm open to changing that

pez 2020-08-13T19:01:22.290300Z

Calva is using pretty ancient cider-nrepl versions. I wonder if that could be the issue... What you say, @bozhidar?

alpox 2020-08-13T19:51:49.290600Z

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.

pez 2020-08-13T20:04:09.290800Z

But if you use jack-in, then Calva should inject version 0.6.0, and I thought that would override any project setting...

alpox 2020-08-13T20:10:20.291Z

Hmmm thats weird... cause I only change [nrepl "0.8.0"] to [nrepl "0.7.0"] in project.clj and it works

alpox 2020-08-13T20:15:20.291200Z

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"]'

pez 2020-08-13T21:16:39.293200Z

We should pobably add a calva-jack-in option to the Luminus template. Which doesn't add the editor dependencies to the project.

yogthos 2020-08-13T21:43:56.293400Z

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

bringe 2020-08-13T22:10:06.293600Z

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

๐Ÿ‘ 1
bringe 2020-08-13T23:42:04.297600Z

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

๐Ÿค˜ 2
1
pez 2020-08-14T13:01:49.301200Z

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.

bringe 2020-08-14T16:08:17.000500Z

Yeah, I had it that way before ๐Ÿ˜„

bringe 2020-08-14T16:09:05.000700Z

I'll check on that difference you mentioned with up/down

bringe 2020-08-14T16:10:00.000900Z

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.

bringe 2020-08-14T16:10:49.001100Z

A quick page-down, alt+up works though if you're in the last form and not after it

pez 2020-08-14T16:12:46.002Z

Hey, are you outing me as a non-structural heretic! ๐Ÿ˜ƒ Haha, yes, I must plead guilty as charged in this case.

๐Ÿ˜† 1
bringe 2020-08-14T16:19:51.003300Z

@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.

pez 2020-08-14T16:19:52.003700Z

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...

pez 2020-08-14T16:20:40.003900Z

Sweet gif! Bound to cause a heart attack on some structural purists. ๐Ÿ˜ƒ

๐Ÿ˜‚ 1
bringe 2020-08-14T16:20:54.004100Z

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

esp1 2020-08-14T20:22:16.008600Z

Hereโ€™s what Iโ€™m seeing:

esp1 2020-08-14T20:22:43.008800Z

bringe 2020-08-14T22:11:18.011400Z

No idea why this is happening for you :thinking_face: . What OS?

bringe 2020-08-14T22:12:31.011600Z

Does move line up work above the prompt for you? And in other files?

bringe 2020-08-14T22:20:10.011800Z

@pez do you experience this on Mac?

esp1 2020-08-14T22:23:20.012300Z

Iโ€™m on macOS Catalina 10.15.5

pez 2020-08-15T06:33:48.014Z

On my machine (Catalina 10.15.2) it works exactly as advertised.

๐Ÿ‘ 1
pez 2020-08-15T06:34:30.014200Z

Does alt+up/down work in other files for you, @esp1?

pez 2020-08-15T06:57:22.014400Z

Like, could it be this problem? https://calva.io/quirks/#macos-and-the-slurp-and-barf-keyboard-shortcuts

esp1 2020-08-18T18:38:21.036800Z

FYI I tracked this down to a spurious user keybinding. I removed it and all is working well. Thanks!

bringe 2020-08-18T19:32:18.037Z

Awesome!

esp1 2020-08-13T23:42:46.297800Z

great, will try it out! thx!

๐Ÿ’ฏ 2