Fork me on GitHub
Eric Uitbeijerse07:03:17

Yesterday I got an update of VSC (on Windows 10) and clojure-lsp would not get past the initialization phase anymore. Following the recent instructions from @borkdude fix the issue!. Thx @borkdude 😄. (Perhaps you should add this to the Calva doc because now I only remembered because it was mentioned so recently)

rm -rf .lsp/sqlite.db
rm -rf .clj-kondo/.cache
mv .clj-kondo/config.edn .clj-kondo/config.backup.edn

❤️ 9

PR welcome! 😍

Eric Uitbeijerse10:03:50

@pez, I'm not sure how this works, can/should I raise the PR myself (happy to do it, just want to be sure that it is ok for me to do that)?


Not sure what you mean by raising the PR. But what we usually do is to first create an issue, then file a PR addressing that issue. In this case the issue is extra good because it will serve as documentation as well, for people checking issues when running into problems. See How to Hack on Calva on the wiki if you are unfamiliar with the ceremony involved. Though I seem to recall you have filed PRs before?


I think the descriptions around how to hack on the docs is a bit lacking. So if you set things up such that you can run the docs web server locally, please consider updating the wiki with what might be missing.

Jan Ignatius12:03:46

Hi. I'm a beginner and followed a to get my VSCode+Calva+Win10+WSL2(Ubuntu20.04) dev environment up and running. Everything seems to be running and I can evaluate my code via REPL, but I noticed that in my setup, I'm missing the "CLJ REPL" named editor (as visible;id=3d9da936-6132-488e-857d-0f603526f679&amp;width=3670&amp;userId=&amp;cache=v2), instead I have the "output.calva-repl" open. Did I mess up the setup somehow or is the guide out-of-date?


Hello and welcome, @email113! That guide is a bit out of date. We have replaced that REPL window with the output repl you see now. Since you are a beginner I want to give you the tips of not using the output repl window so much as a repl. Most often it is more effective to type that kind of code into (comment …) forms in the clojure files and evaluate them from there (`alt+enter`).

Jan Ignatius14:03:58

Right, using the alt+enter was the way that I verified that at least something worked with the setup. 🙂


Also, you don’t need to install the clj-kondo extension. It is included in Calva (sort of).

Jan Ignatius14:03:19

ah, it did complain about the existence of kondo


I wasn’t aware of that setup guide, btw. Nice find!

Jan Ignatius14:03:29

I'll remove the extension to avoid surprises.


Are you a beginner to Clojure too, maybe?

Jan Ignatius14:03:49

I almost gave up on the setup when I started reading That page leaves the impression that Windows is not a viable dev platform at all. Unless one is willing to use alpha-grade sw.

Jan Ignatius14:03:34

I haven't touched programming in almost 20 years, not counting some small VB stuff with office suite.


It is a bit of a bother to set things up on Windows. I think most Clojure people use WSL there.

Jan Ignatius14:03:31

WSL should get a mention on, I feel.


I need testers on a beginner’s feature I am working with. Up for it? 😃

Jan Ignatius14:03:49

Sure, I certainly fit the bill


For Clojure/Calva use with WSL, see this by Borkdude:


Cool! Just a sec.


@email113 There is also #clj-on-windows

Jan Ignatius14:03:08

Thanks, I'll join the channel.


Windows is very much a second grade citizen when it comes to tooling in Clojure, but there are options. E.g. I made which offers a binary which is a drop-in replacement for the clojure CLI which works in cmd.exe

Jan Ignatius14:03:48

I was going through the available channels on this Slack but I stopped after the first five pages and still being on the "C"s 😉


And there is #scoop with lots of nice Clojure utils for the (Windows) command line


And there is #babashka for Clojure scripting which also works on Windows


@email113 If you install this VSIX in vscode (Extensions pane -> meatballs menu -> Install from VSIX), there is a new command there: Fire up the Getting Started REPL.

Jan Ignatius14:03:08

@borkdude I'll go through you repo with interest


You might need to rename the downloaded file from .zip to .vsix.

Jan Ignatius14:03:15

@pez Yeah, I can't point it directly to the url


Ah, now I understand. Would be cool to be able to install from a URL, but you’ll need to first download.


It’s very much work in progress. You can read a tad more about it here:

Jan Ignatius14:03:12

Ok, I have it installed


Awesome. Run that command and wait a few seconds and you should have a REPL started and three files to REPL your way through. The third one is pretty big, and will grow even more as I finish up some kind of v1.

Jan Ignatius14:03:41

Very cool, I'll dig in and report back

Jan Ignatius14:03:13

Would you prefer comments/questions as PMs or just directly on this channel?

Jan Ignatius14:03:45

Or to the Forum thread?


Super duper. I totally appreciate it!


Forum thread, here, and as issues on this repo: You can mix it up, whatever makes sense. 😃


Gotta admit I’d love me at least one comment on that forum post. Awfully silent there. 😃

Jan Ignatius15:03:03

Already found a typo and an area that should get a clarification .. just give me while


If you like you can fix the typo’s by PR. But I’ll take the feedback in any form with great gratitude 😃

Ilan Uzan15:03:13

hi guys, for some reason the "ctrl+alt+c i" shortcut does not appear to have any affect. "alt + enter" works, setting breakpoints with #break or debugging with #dbg works - only this shortcut doesn't work.. I am working on kubuntu 20.04 - will appreciate any help:)

Eric Uitbeijerse15:03:39

Same here after the last VSC update (on Windows). "ctrl+alt+c i" still works but it is not decorated anymore


Hey Eric, would you mind chiming in on this issue with more details, such as Windows version (like 10 home/pro, etc), and whether it happens with lein or deps projects. I'm not certain they're related but want to investigate more before making separate issues. I can't reproduce this issue on Windows 10 Pro or Manjaro Linux with VS Code 1.54.1. Both decorations and the debugger work as expected in both.

Eric Uitbeijerse07:03:25

@U9A1RLFNV sorry for the delay, it's windows 10 enterprise using Lein. Happy to provide more details but please allow for some delay as Clojure is a hobby project for me so I'm not working on it every day. Version: 1.54.1 (user setup) Commit: f30a9b73e8ffc278e71575118b6bf568f04587c8 Date: 2021-03-04T22:38:31.419Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: OS: Windows_NT x64 10.0.19041


No worries for any delays! Thanks for the info


Sounds like a bug. Please report! 😃

👍 3

SockworkOrgange, haha. Guessing you might be my age? 😃

Ilan Uzan17:03:21

don't know, are you also 27 years old?:)


Haha. Double that!

Ilan Uzan18:03:57

@pez the name isn't a reference to Clockwork Orange, it's a reference to an homage to Clockwork Orange done in "Me, Earl and the Dying Girl"


Amazing. 😎


Dear Calva friends. Here’s a new VSIX for the Getting Started REPL feature for you to test. The update here is that if you have tried the feature before with earlier dev builds, you’ll get prompted about wether to create a new temp dir or reuse the existing one + files. This since the guides might have been updated, but you might want to keep any experiments you’ve conducted in the already downloaded files. The prompt looks like so:

Jan Ignatius20:03:04

Is it possible to see the intermediate results of a evaluation with Calva. E.g. I would like to better understand what happens on each step of: (as-> 15 $     `(range 1 $ 3)`     `(interpose ":" $))` Can I somehow inspect e.g. the output of range?


You may be able to use the debugger by placing #dbg before that top level form, if it is a top level form:

Jan Ignatius20:03:48

Thank you, I'll look into it.


You could also use a spy function as seen here: Just need to add as a dep in your project


Many times for small experiments like this though, you can copy an expression out into a comment form, replace variables, and run it there. Or, if there aren't variables in it you can run it directly from where it exists by placing the cursor before or after it and running the command to evaluate the current form


Another method is to def the variables in the expression, then run it in place as I mentioned above


So you could eval (def $ 100) then place your cursor here:

(as-> 15 $
    (range 1 $ 3)|
    (interpose ":" $)) 
And evaluate the current form (not top level) - ctrl+enter


This is part of the beauty of clojure repl dev


I think CIDER has an Evaluate up to (or some such) command. It evaluates the thread up to where the cursor is. Please file an issue with that feature request on Calva, @email113.

Jan Ignatius06:03:37

Ok, I've added a feature request in Github