This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-04
Channels
- # adventofcode (161)
- # asami (2)
- # babashka (56)
- # beginners (128)
- # calva (57)
- # cider (10)
- # circleci (1)
- # clj-kondo (4)
- # clojure (13)
- # clojure-europe (44)
- # clojure-france (32)
- # clojure-italy (3)
- # clojure-nl (18)
- # clojure-spec (7)
- # clojure-uk (26)
- # clojurescript (18)
- # code-reviews (15)
- # community-development (7)
- # conjure (5)
- # cryogen (8)
- # cursive (31)
- # datomic (18)
- # emacs (8)
- # events (4)
- # figwheel-main (7)
- # fulcro (42)
- # juxt (3)
- # kaocha (58)
- # lambdaisland (1)
- # malli (1)
- # minimallist (1)
- # pathom (11)
- # pedestal (9)
- # re-frame (28)
- # reagent (20)
- # reclojure (4)
- # releases (1)
- # reveal (23)
- # schema (2)
- # shadow-cljs (7)
- # test-check (67)
- # xtdb (23)
Hi Pez, I liked your “ClojureScript loves React Native” video on YouTube! Your vscode setup looked neat, what theme were you using?
I’m using GitHub Dark. It’s not perfect (themes never are, right? 😃 ) but it is the nicest one I’ve found. I think it might be as complete, or maybe even more complete, than the default dark one.
Thanks! That is true that themes are never perfect. I find myself changing those frequently when I got tired on my current one 🙂 I’ll try this one next
I think it is more complete than the default one, because it shows me bugs in Calva’s syntax highlight that I wasn’t aware of. 😃
I’m feeling more lazy than adventurous today, so I’m wondering if somebody else has already gotten Vlaaad’s Reveal working with Calva and Leiningen? I’m pretty sure it should be possible…. somehow…
I listened to the #defnpodcast with @vlaaad the other night. Got me super curious about trying Reveal out with Calva. Would love if someone added how to set it up to http://calva.io.
Yeah I read that, but I couldn’t find vlaaad.reveal.nrepl/middleware
on Clojars so I’m not sure about the version number. And I also seem to run into the JavaFX thing where I apparently have a JDK8 without JavaFX, but that shouldn’t be too difficult to fix I guess.
This middleware is a part of default Reveal distribution, not a separate artifact. Having Reveal on the classpath is enough to use this middleware
Ok I got it working. @pez I put this in my Leiningen project.clj
:
:profiles {:reveal {:dependencies [[vlaaad/reveal "1.1.164"]]
:repl-options {:nrepl-middleware [vlaaad.reveal.nrepl/middleware]}}}
With that, normal jack-in (using this profile) should launch Reveal as well.Awesome. Can i hope for a PR adding that info to http://calva.io? 😍
If you’re going to try this out using a tools.deps project, could you maybe add that to the doc page?
Oh, didn’t see the PR. Very cool. I suggested you add something about PR welcome to the deps section.
Has anyone here had an issue with not being able to get env vars from Calva's repl? If I run clj -r
I can call (System/getenv "MY_VAR")
and see the value, but if I run that same line in Calva's repl (created by jackin), it returns nil
Interesting.... it has something to do with cider-nrepl or its middleware. If I take the jackin command and modify it to remove cider-nrepl, then it works :thinking_face:
clojure -Sdeps '{:deps {nrepl {:mvn/version "0.8.2"}}}' -A:dev -m nrepl.cmdline
@pez Any idea here? I've set the env vars in ~/.bashrc, have restarted my shell/vscode/my computer. I wonder if I need to set them elsewhere.
Update: If I copy the jackin command and paste it in a terminal and start the repl that way, with an unmodified jackin command, and then connect to it manually, I can get the env vars. Using the vs code jackin command directly though, I cannot. I wonder what about the jackin process is different that makes my shell's added env vars inaccessible.
That fixed it -_-. I had seen people have this issue before but forgot, because it hadn't happened to me yet 😄
Do you think this has something to do with how Calva is starting the repl? For example, I can start vs code by clicking the shortcut, without using the terminal, and copy/paste the jack-in command into the integrated terminal, then connect calva to it, and it works.
It only doesn't work with the above start method when Calva issues the jack-in command itself
What I'm saying is, maybe there's another way to run the jackin task that would give access to the terminal env vars? I wonder if this PR could fix it - https://github.com/BetterThanTomorrow/calva/pull/654
We really should finish that WIP PR. Unfortunately it can’t fix this issue. Whatever process we start from VS Code, it can’t inherit an environment that VS Code does not have.
https://calva.io/connect/#environment-variables-are-not-readable-from-repl Now it's documented 🎉
Is the clojure-lsp
branch close to being merged in? Very excited for that feature 🙂
It’s quite a bit from being merged, @mitchell_clojure. But it is often quite useable for the non-picky user. 😃 You can help test it as we move along, Via VSIX of via running Calva in dev mode from the branch. If via VSIX: There is a VSIX built every time the branch is updated, If you are logged in on CircleCI, you should be able to pick the VSIX up from the links at the PR.
ooh might have to give it a go. Are those instructions somewhere I should have seen?
@mitchell_clojure See here: https://github.com/BetterThanTomorrow/calva/wiki/Testing-VSIX-Packages I had typed out a message earlier about testing the vsix starting now, but I have a whole list of things that need to be tidied up before releasing. Things like duplicate hover content, Go To Definition showing two definitions because Calva is providing a definition via nrepl and then clojure-lsp is providing a definition - this results in a peek window opening because vs code thinks it's two definitions (each provides a different location, one next to symbol and one next to def).
There are other things as well but it's a lot to type, which is why I stopped earlier and was going to wait
But feel free to test and make sure nothing crazy is happening. A lot of these things are easy to fix, and I'll be doing so in the coming weeks.
Yeah, what I wanted to avoid is people testing and reporting all the things I know about, and then having to respond to each one lol
Also see here, @mitchell_clojure: https://github.com/BetterThanTomorrow/calva/wiki/How-to-Hack-on-Calva
I thought about it, but it will be so easy to fix most things I don't know if it's worth the time to write them up before then
Your call, @brandon.ringe, since you are driving this.
I guess it depends on how far out a release can happen. I think I may fix some of the easy things next week and then create the shorter list
Anyway, for periods of times I have been running on the crude version I built when starting that PR. It is quite usable and the quirks do not overshadow the benefits from some of the nice things that cljoure-lsp brings.
Unsure. Related to this is that there is a "proof of concept" folder for VSCode integration in the clojure-lsp
repo that is over a year old. It is definitely a red herring for other people like me who might be curious about progress
This will certainly not be a smooth easy task for @brandon.ringe. But that is why it is good that he is the one doing it. 😃