This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-16
Channels
- # announcements (11)
- # atom-editor (4)
- # babashka (26)
- # beginners (126)
- # calva (35)
- # chlorine-clover (14)
- # clj-kondo (50)
- # cljfx (1)
- # cljs-dev (1)
- # cljsrn (3)
- # clojure (31)
- # clojure-europe (144)
- # clojure-germany (2)
- # clojure-nl (3)
- # clojure-serbia (17)
- # clojure-spain (11)
- # clojure-uk (38)
- # clojurescript (87)
- # community-development (1)
- # conjure (1)
- # datalog (1)
- # datascript (160)
- # datomic (28)
- # duct (2)
- # emacs (4)
- # events (1)
- # figwheel-main (1)
- # fulcro (15)
- # graalvm (4)
- # honeysql (53)
- # jobs (2)
- # jobs-discuss (14)
- # juxt (6)
- # lsp (59)
- # malli (13)
- # music (1)
- # off-topic (8)
- # pathom (22)
- # portal (7)
- # re-frame (2)
- # reagent (3)
- # releases (1)
- # remote-jobs (1)
- # rewrite-clj (1)
- # shadow-cljs (25)
- # sql (3)
- # tools-deps (38)
- # xtdb (17)
Attempting to configure VS Code + Calva. Ran into an issue though with the Clojure Language Client server: > Unable to locate a Java Runtime.
I’ve got java installed:
openjdk version "15.0.2" 2021-01-19
OpenJDK Runtime Environment (build 15.0.2+7)
OpenJDK 64-Bit Server VM (build 15.0.2+7, mixed mode, sharing)
@jayzawrotny Check if you have the java
command in the integrated terminal in VS Code. If not, then VS Code has been started in a way that does not have the environment you need. Starting VS Code from a terminal with the right environment should fix it (if this is the problem),
Using the clojure-lsp native graalvm binary should fix issues like that as well @brandon.ringe @pez :)

Thanks @pez just tried it and same issue running java -version
in vscode terminal, which helps me better understand where to start. I think my mistake is I was running zsh through my configured shell to test which inherits the proper path vars. I did install clojure-lsp-native through brew which I thought would not require java?
Ah that makes sense!
We’ll use the native one eventually, but we have run into issues with that work. Right now it is using the .jar
.
Got it working! This is a good lesson to not try and take on such challenges when half asleep 😛 I setup a zshrc in my dotfiles, but didn’t create the symlink to ~/.zshrc for it and when I was testing it by running zsh within my configured elvish shell I got false positives.
Thanks again for the help. What are some of the issues getting the graal version to work?
It's not really an issue related to clojure-lsp. I had recently rewritten the lsp integration code in cljs, partly as an experiment for using cljs for more of Calva, and then added on the graalvm integration code to the cljs. After doing that an issue with cljs/js interop that I had worked around before popped back up, so I'm working on solving that.
It's a strange issue where calls to our cljs from js work fine in some cases but not in others, and I haven't found a cause for it, but I'm making progress toward a solution.
I need to start VS Code from the terminal on my machine, @jayzawrotny. Not sure if it is MacOS related, but seems to be very common there. Starting it via Finder gives it some weird environment. It’s not just VS Code. I’ve seen this issue hit people with all kinds of editors. Someone told me that at the root it is a permissions issue, but I never investigated it. Starting via the terminal works for me. 😃
I think that’s similar to the issue I ran into. Though in my case I just had to create a ~/.zshenv with the paths updated.
Something that helped me was temporarily opening the default Terminal app which is configured to use the default shell. That’s when I realize java wasn’t available on the path there, which is what the vscode terminal was using.
Hi all, wondering if there is something I need to configure in order to get markdown formatting for docstrings as well as autocomplete panel to pop up with docstring. I do get docstrings when hovering with command, but it’s the raw source code. During typing I only see the option for the name and not any args. I see this merged: https://github.com/BetterThanTomorrow/calva/pull/503 Thanks
Are you connected to a repl when hovering? When I am, a hover looks like this. Can you give an example of what's expected?
You may have to run "Trigger Suggest" for the doc string to show for autocomplete like that. For me this is mapped to ctrl+space
Actually that's also mapped to toggleSuggestionDetails
so that may be what's doing that
Hi @brandon.ringe, thank you. Yes, connected to clojurescript repl, when I hit ctrl+space
this is what I get
That's weird. I just tested with a clojurescript (figwheel) repl and suggestions work fine. Please file an issue with your repro steps and project details so we can investigate further.
@pez @brandon.ringe Have you seen https://www.reddit.com/r/Clojure/comments/m6bray/calvavscode_question/ ?
Thanks a lot, @U04V70XH6! I’ve replied now. Been waiting for that question almost.
I had a reply typed out but deleted since you replied first lol. My reply didn't add much. I'm wondering if they're new to Clojure and if they didn't understand that they can actually run code from those files interactively. The docs only point out running the getting started repl and those files opening, but doesn't mention what we may assume to be obvious, that they can interactively work through those files.
I’ve tried to connect the dots a bit clearer now, on http://calva.io as well as in the drams. Very good with feedback like this. We probably need to step the Getting Started story up at least one notch more. I have some ideas and will hammock them a bit. Let’s see if they survive that. 😃