This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # babashka (5)
- # beginners (151)
- # calva (43)
- # clj-kondo (23)
- # cljdoc (1)
- # cljs-dev (6)
- # cljsrn (10)
- # clojure (60)
- # clojure-australia (1)
- # clojure-europe (26)
- # clojure-gamedev (14)
- # clojure-nl (1)
- # clojure-spec (10)
- # clojure-uk (80)
- # clojurescript (66)
- # clojureverse-ops (4)
- # community-development (7)
- # conjure (8)
- # datomic (15)
- # deps-new (1)
- # docker (27)
- # emacs (2)
- # fulcro (13)
- # honeysql (13)
- # java (5)
- # jobs-discuss (43)
- # lsp (121)
- # luminus (13)
- # malli (1)
- # off-topic (73)
- # pathom (12)
- # polylith (29)
- # practicalli (4)
- # re-frame (35)
- # reagent (44)
- # remote-jobs (5)
- # rewrite-clj (2)
- # sci (7)
- # shadow-cljs (125)
- # sql (4)
- # tools-deps (9)
- # xtdb (5)
@U0ETXRFEW I reset the LSP version, and Calva complains (after the restart) that the field isn't set and LSP will not be started.
Ah, this seems to be on WSL2 only, with the Remote install.
Strange WSL2 specific behaviour... How did you reset this? (Editing settings.json or other method.)
I just blanked out the field in the setting pane. It works fine on macOS as far as I can tell.
Can you check if there is an entry in
settings.json for this still? (There are VS Code commands for opening the relevant JSON file.)
Well, I just set the field again and reloaded to get it working 🙂
And it's downloading LSP at the moment (I'm on mobile data, waiting for my wife at the hospital)
I can try it myself from your description. Hoping things are not too awful for your wife?
Just a CT scan. Possible cyst on her pancreas.
Here's the message from Calva: The calva.clojureLspVersion setting is blank and calva.clojureLspPath is also blank, so clojure-lsp will not be started. Please reset the calva.clojureLspVersion setting to use the default version of clojure-lsp, or set it to a clojure-lsp version you want to use. Alternatively, you can set the calva.clojureLspPath to use a downloaded binary of clojure-lsp.
(it downloaded & started LSP -- now I blanked out the field and reloaded to repro)
The JSON has
Yes, so that should behave like the message says. I would say the WSL2 issue you had is the correct one. 😃
Yup. If I delete that line from the JSON and reload, it finds LSP and starts it just fine.
I don’t remember why we don’t support a blank setting, but anyway, reset it in the settings panel, using the cog-wheel icon menu, or remove the entry from settings.json.
So blanking out the field should work, but doesn't?
Not really. There are two complected settings for lsp. Either you set the
clojureLspPath (providing an executable at the path) or the
clojureLspVersion (telling Calva to download that version). I think the path overrides the version. (And I still don’t remember why a blank version setting isn’t working.)
It's working now, so thank you 🙂
And thank you. I think I need to fix the blank version setting case and/or clarify what “reset” means in the documentation and description.
I added that message in the past after realizing an issue with it being blank. Here's a comment from the code:
At the time, we weren't defaulting to latest. When the version setting is blank, I may have thought/assumed there was no way to get the default setting (it's set in package.json), though I'm not sure why I thought so. Also at that time we weren't defaulting to the latest version like we are now, so when the setting was blank, assuming we couldn't get the default value (maybe we actually can), we had no way to know which version to run.
// This should never be an empty string and can cause issues with clojure-lsp starting, particularly if there is no version file yet from a previous download and no custom clojure-lsp path set. Inform the user.
If I'd already read the text over the setting field, I would have seen that
latest is a valid setting... but I just followed "reset the setting..." in the release announcement 🙂
We instruct to reset in the docs as well. (Since if a user wants to go with the defaults it is better to reset them than to set them to whatever is the current default.)
Fixed it so that blank is interpreted as
latest in this PR. https://github.com/BetterThanTomorrow/calva/pull/1252
Anyone using VSpaceCode? I'm trying it out with Calva, just to see how the other side lives and I'm going through the hello_repl docs 🌟. I've got two questions (already):
1. In normal-mode I can't put my cursor past
(->> colt-express :ratings vals average)
:ratingsso I can't eg. run the
Ctrl+Alt+Enterto just eval up to that point (I would need to put my cursor on the whitespace before
vals. 2. I can't seem to find any major-mode keybindings for this operation to eval "up to some step" in the threading macro. e.g. I can use the keybinding
, e fto eval top-form or
, e eto eval current form, but nothing for this operation. Is there some extended keybindings I'm not aware of? I apologize in advance for my #noob questions, but I'm new to both VSCode and Calva. Also, let me know if this is not the right channel for VSpaceCode questions.
OK, it seems I can mainly just replace it with
Shift+Alt+Enter on the next line and it will Work As Expected. I don't think there would be many times where I would not want to eval from top-level-form
These evaluation commands are pretty new, so maybe they predate the VSpaceCode configuration. Could that be it, @U05254DQM?
I was looking for the equivalent of emacs
describe-key to find out what this shortcut was doing, but I ended up just digging into the source: https://github.com/BetterThanTomorrow/calva/blob/fc236c9778d0e2d6bd6596f6586ed69665820b14/package.json
I just used the command pallet to find the command names. 1) this is how Evil is supposed to work in my opinion, nothing to change here 2) The PR you found on VSpacemacs shows you how to add keybindings I dont use Calva myself, unless I am going to do a VSCode Live coding session, so it would be quicker to add your own that wait for me:)
#_ reader macro comments if I want to see only part of a threading macro. I have a keybinding in Emacs to comment sections of the thread this way, perhaps something can be to Calva for this (I have no idea how)
@U05476190, the source works well for this. There is also the Keyboard Shortcuts panel
cmd/ctrl+k cmd/ctrl+s. There you can search for commands by shortcut or by name.
@U05254DQM RE: 1, this is how it works in ViM, but in Emacs Evil mode, I can put the cursor after the last char in the line (even though there is no actual whitespace character written to the file); which is super useful for all the kinds of commands that are based on "eval the last form/thing/etc". I wonder if this is some kind of option I can change in vscode.vim
Thanks for the following up @U05254DQM and @U0ETXRFEW; I'll be sure to try to use Calva more over the next couple of days
It’s tricky for Calva to solve this. The Vim extension does not have an API. So there is no way for Calva to know that Vim
normal mode is active.
1. thats not normal evil mode behaviour as I see it. some people like to change the behaviour of evil and are free to do so, but its not for me. I use use the next line, as lines are irrelevant to those commands. I only use eval-last s-expression commands to evaluate nested expressions
that uses vscode.vim? https://gist.github.com/corasaurus-hex/3f145ce1588d88956723214a068a5c7a
Yes. And apparently this PR: https://github.com/VSpaceCode/VSpaceCode/pull/154
That PR was the most JSON I have ever written in one weekend, not the most enjoyable weekend I've had. But happy it works and others find it useful