Fork me on GitHub

I’m running a Calva deps clj project in one VSCode workspace, and a Calva shadow-cljs project in another. They have nicely separate clj and cljs repls up and running except that they appear to share a common output.calva-repl. I get prompts like this on every cljs repl command. Is there any way to avoid this?


Please file an issue about this. We probably need to make the file path configurable…


It should be possible to use the same workspace, but people have had problems setting that up as well. But could be worth a try?


OK, will do. I did try a single workspace, but that made me share and switch a repl and organising the deps was really delicate. I could only get it working by connecting to a terminal started clj-repl and then using the shadow cli commands to switch to a cljs-repl. And it’s unpleasant having to switch repls.


Calva should use the CLJ repl in Clojure files and the CLJS one in ClojureScript files automatically. You mean that that was not happening?


It was getting very confused with dependencies when I tried that - I was using deps+shadow. The clj repl couldn’t find dependencies that were definitely in the deps, but when I ran in pure deps mode it could. So that started me on a search for alternatives.


Yeah, you’re in the but people have had problems setting that up cohort… I hope we will figure out the receipts for getting that to work.


Just tried that again and hit this on a shadow+deps jack-in while looking at app.cljs. This is what I saw:

; Creating cljs repl session...
; Connecting cljs repl: deps.edn + shadow-cljs...
;   The Calva Connection Log might have more connection progress information.
; Execution error (FileNotFoundException) at user/eval5213 (REPL:1).
Could not locate shadow/cljs/devtools/api__init.class, shadow/cljs/devtools/api.clj or shadow/cljs/devtools/api.cljc on classpath.
; Error while connecting cljs REPL: TypeError: Cannot read property 'search' of undefined
; Jack-in done.


You’ll need to have shadow-cljs as a dependency in the dev alias you are using, I think.


Or edit the jack-in CLI command used and add the dependency there. Then use that command to start the REPL and the Connect command from Calva.


Yeah I forgot to patch shadow back in to the deps on the retry. But I then get this issue, which is again caused by:


To quit, type: :cljs/quit Socket closed Socket closed Socket closed Socket closed Execution error (FileNotFoundException) at user/eval5213 (REPL:1). Could not locate shadow/cljs/devtools/api__init.class, shadow/cljs/devtools/api.clj or shadow/cljs/devtools/api.cljc on classpath. Socket closed


(That was the output channel)


I think i’m going to stick with separate cljs and clj for now. It feels simpler.


Yeah, I probably would too…


The two projects share a repo folder.


hi) would you please help me: I've installed VSCode with Calva on Windows 10. Is there a way to use a build-in leiningen from outside of VSCode? (from cmd or powershell, for example) Thanks!


Not sure I understand. If you mean if you can start the REPL from a terminal and connect Calva to it, then yes. See:


A misconception of having support built in, not the tool?


Hmh, perhaps I should have put those in the reverse order


I want to run commands like "lein new ...", "lein run", "lein test" from Windows cmd or powershell and I prefer to use leiningen which is already build-in Calva. I don't want to have separate installation for leiningen.


Anyway, calva doesn't ship leiningen code in it, I think (never having used lein with calva, just deps.edn)

👍 1

Calva doesn’t bundle anything lein. You have to use your local install. To connect Calva to the project’s REPL, you have to start it in a way that satisfies Calva’s dependency requirements. See the documentation for how to get Calva’s help with that.

👍 1

Thank a lot for clarification!

Michael Mackenzie14:10:10

Hey guys, I've recently started using Clojure professionally at work. In the past, I'd worked on hobby projects in Clojure and used intellij/cursive but at work I'd been using VS code for everything so decided to try out Calva to see where Clojure support was at. I'm working on a backend project, and one thing that's been extremely difficult to work with is being unable to see any java sources for the libraries I'm using in the project (i.e. being able to click on symbols and view their definitions, docstrings etc) Is there any way to get this working in Calva/VSCode?


Hi there! The support for Java can’t really compare with that of Cursive, but peeking at and navigating to code, as well as some completions works if you have the sources installed on your classpath. See this issue for some clues:

Michael Mackenzie14:10:11

Thanks a lot, I'll take a look


There is also some work going on in clj-kondo about this, but currently only in the "what direction should we take phase"


(clj-kondo supports the navigation features in lsp)


e.g. bytecode inspection is one of the things that is being considered


I think it should be possible to extract at least method names, but where should you then direct the user when clicking on the method?


In cider-nrepl there is some attempt to look up sources online for Java things. I don’t know when it is supposed to be used, but maybe it is a feasible backup solution if the sources are not on the classpath?

Michael Mackenzie15:10:53

in intellij, it sends you to the decompiled .class file and if available gives you the option to download the sources

Chris S18:10:58

Hi all. I need your help setting up my VS Code on Mac to work with Clojure. I followed the instructions at and, but it doesn’t work. For example, I’m in the newest version of VS Code for Mac; I create a new file by going to File --> New File; I click in the editing pane for Untitled-1; I press Shift-CTRL-P and nothing happens. What am I doing wrong? Here are the extensions I have installed and enabled:


It's command+shift+p on Mac.

Chris S19:10:18

THX! (Where should I have looked to find that out without having to ask on #calva?)

Bob B20:10:34

the command palette specifically (which is that window where you can search for commands) can also be accessed from the "View" menu (and I think that'll show the shortcut as well). Fortunately, once you've got that shortcut down, you can use it to find pretty much any command, and at least on Windows, the command palette will also show you what the keyboard shortcut for that command is


What @U013JFLRFS8 says. We try to introduce this here a bit:


It is interesting that you have to dig around quite a bit in the VS Code user docs to find out about the Command Palette …


> (Where should I have looked to find that out without having to ask on #calva?) I’m happy you asked here!

Chris S18:10:04

Thanks in advance!!