I'm not sure if that's implemented in clojure-lsp yet. @ericdallo could tell us more.
Oh, I see it in the clojure-lsp docs now. I see a fix related to the call hierarchy feature was released in a later version than what Calva uses currently. I'm not sure though if it should be working to some extent right now.
Eric, when I run the call hierarchy command in VS Code, I see in the logs that the textDocument/codeLens and codeLens/resolve requests are made, but that's it. Should something else be happening?
We have only support for incoming call hierarchy lsp method and it should work
@brandon.ringe it should call textDocument/prepareCallHierarchy and callHierarchy/incoming if I recall correctly
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 :)
Though, if you don’t have java in your path the Clojure story is broken anyway. 😃
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?
Calva has its own clojure-lsp, so it doesn’t matter which one you install or how. 😃
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. 😃
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?
And then when typing I see the doc string like this
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
It's a toggle so it'll keep showing doc strings after you do that
Actually that's also mapped to toggleSuggestionDetails
so that may be what's doing that
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 @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.
Will do thank you
@pez @brandon.ringe Have you seen https://www.reddit.com/r/Clojure/comments/m6bray/calvavscode_question/ ?
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. 😃
Great job with the video! Still watching right now but I'm loving it.
I had not, thanks!
Thanks a lot, @seancorfield! 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.
Just a guess though. I'm interested to see what's unclear.
Also my guess could be way off 😄