This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (1)
- # babashka (44)
- # beginners (188)
- # calva (37)
- # chlorine-clover (28)
- # cider (12)
- # clj-kondo (40)
- # clojars (1)
- # clojure (323)
- # clojure-austin (7)
- # clojure-europe (20)
- # clojure-italy (4)
- # clojure-nl (16)
- # clojure-spec (7)
- # clojure-uk (37)
- # clojuredesign-podcast (1)
- # clojurescript (30)
- # cryogen (2)
- # cursive (30)
- # data-science (1)
- # datomic (26)
- # emacs (1)
- # events (1)
- # figwheel-main (13)
- # fulcro (89)
- # garden (1)
- # graalvm (20)
- # graphql (8)
- # jobs (1)
- # jobs-discuss (1)
- # joker (6)
- # kaocha (125)
- # lambdaisland (1)
- # meander (42)
- # off-topic (18)
- # pathom (3)
- # pedestal (6)
- # shadow-cljs (55)
- # spacemacs (21)
- # sql (18)
- # tools-deps (8)
- # uncomplicate (2)
- # vim (1)
- # yada (3)
@pez here is my project (https://github.com/matdurand/shadow-cljs-firebase)
When I jack in using Calva, I start both
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.
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: https://4522-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.81-wip-cljfmt-config-09a6affa.vsix
I wrote some docs for it. Here: https://github.com/BetterThanTomorrow/calva/blob/wip/cljfmt-config/docs/readthedocs/source/formatting.md
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.
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. https://4527-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.81-wip-cljfmt-config-bd150f7d.vsix It has the fun new feature that I think @conan asked for: Configurable formatting. Docs here: https://github.com/BetterThanTomorrow/calva/blob/wip/cljfmt-config/docs/readthedocs/source/formatting.md 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?
the docs mention a
lein-cljfmt plugin, which implies that i need to set up a leiningen project?
Test it like so: Open two VS Code windows. (Open one, then do File -> 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.
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.
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...)
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: https://github.com/weavejester/cljfmt/issues/106 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.