Fork me on GitHub

@pez here is my project ( When I jack in using Calva, I start both functions and functions-tests , I can see the functions-tests terminal re-running the tests when I change something like you said. Then I connect to the functions repl using calva, and load the mypackage.core namespace into the repl, but then any attempt to run a function (like mypackage.core/hey) result in the "No application has connected to the REPL server message." After googling a little, I think this messages comes from shadow-cljs.


Yes, it's a shadow message. There needs to be a REPL server running for Calva to connect to. Because reasons Calva can't detect off this really is the case with shadow projects, so it pretends. You need to run your app in node, because that's where the REPL server lives.


@mathieu.durand looked at the project quickly now. I think you will need some app that uses your :node-library and then start that app. While that app is running you should be able to connect to its REPL. The best place to ask about this is in #shadow-cljs , I think.


Sorry for being mute on your questions, @conan! I totally missed that you had replied...


It is both cljs and ts, anyway. And I have concluded that the PR was quite close from getting something usable in place. In my branch there I have it working, and it is pretty sweet. Please try this VSIX package:


The only stopping issue I know about is that now you can't put any new lines into the REPL window. No idea if that will be hard or easy to fix. If you are like me and do not use that window much, then it is not much of a bother, of course.

thumbsup_all 4

I will try it! The funny thing is, I’m mostly a cursive user, so I don’t use a REPL at all I’m VSC - this is for my team


Have someone in your team test then. 😀 I fixed that bug in the latest VSIX i posted. It should actually just work now.


I've found a bug now. The align elements command doesn't work right now. I doubt it is a big deal for anyone, but anyway. Will fix.


So, if some of you Calva friends could take this VSIX for a spin. It has the fun new feature that I think @conan asked for: Configurable formatting. Docs here: I'd say it's pretty cool! And mostly the work @nbardiuk , btw. ❤️


this looks like it can do exactly what i'm after! is there any chance you could help me get it working? i've created a .cljfmt.edn file and added calva.fmt.configPath to my settings.json in vs code, but it's not picking the file up. is there something else i need to do?


Did you figure out how to use the VSIX file?


If you have time for a Zoom, I can help you that way.


the docs mention a lein-cljfmt plugin, which implies that i need to set up a leiningen project?


Or, maybe I can't help you, but at least we can figure out what's wrong together. 😃


ok one sec, that would be great


No need for leiningen here.


Invite me!


Good that you mentioned that leiningen thing. I should add that to the docs.


ah, i made a mistake, i don't think the absolute path is working for .cljfmt.edn


You made a mistake in your testing?


Test it like so: Open two VS Code windows. (Open one, then do File -&gt; New Window). In one window open that project folder. In the other open the folder containing the out-of-project config file. Set Config Path in User Settings to the absolute path of that out-of-project config file. Edit the config file in the VS Code window where you have its root directory. Check if the settings are active in both VS Code windows.


I hope I got that right and that it makes sense. 😃


So, I think I know what is going on. When the file is outside of the project, VS Code does not pick up changes to it. But it reads it when the project folder is opened. For config files inside the project the hot reload seems to work.


yes, this is the behaviour i've seen


which is fine, it changes rarely


I solved it by updating the docs. 😃


It's released BTW. Ask your colleagues to update Calva, please. And holler my way if anyone runs into problems. (Shouldn't happen, of course, but hey...)


amazing, thank you!


You're welcome!


We've been playing with this functionality and it allows us to achieve what we need (yay!). However it seems that cljfmt doesn't work with namespaced keywords: Unfortunately in a world of clojure.spec that's all of them. Is it likely that Calva will support an alternative formatter to cljfmt in the near future?


It is a bit deeper than cjfmt. Most formatters has this problem, b/c they are all using rewrite-clj. There are initiatives started to fix this, but right now...


In theory the experimental Calva indent engine should not have this problem. But it is not a full formatter, it only will indent things as you type. Look for it in the settings if you think it could help in any way.


To peek your interest in testing out that format config VSIX, I cooked this GIF. Isn't it pretty cool being able to use the config file as the test file for the config? 😃

❤️ 12
👍 4