calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
bringe 2021-03-16T01:37:30.000100Z

I'm not sure if that's implemented in clojure-lsp yet. @ericdallo could tell us more.

bringe 2021-03-16T01:44:30.000300Z

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.

bringe 2021-03-16T01:45:43.000500Z

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?

ericdallo 2021-03-16T01:54:46.000700Z

We have only support for incoming call hierarchy lsp method and it should work

ericdallo 2021-03-16T01:55:47.000900Z

@brandon.ringe it should call textDocument/prepareCallHierarchy and callHierarchy/incoming if I recall correctly

2021-03-16T03:51:37.002Z

Attempting to configure VS Code + Calva. Ran into an issue though with the Clojure Language Client server: > Unable to locate a Java Runtime.

2021-03-16T03:58:16.002300Z

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)

pez 2021-03-16T07:12:28.004400Z

@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),

ericdallo 2021-03-16T12:11:33.005800Z

Using the clojure-lsp native graalvm binary should fix issues like that as well @brandon.ringe @pez :)

👍 1
1
pez 2021-03-16T12:42:16.006800Z

Though, if you don’t have java in your path the Clojure story is broken anyway. 😃

1
2021-03-16T15:39:13.009400Z

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?

pez 2021-03-16T15:42:39.010100Z

Calva has its own clojure-lsp, so it doesn’t matter which one you install or how. 😃

2021-03-16T15:43:09.010800Z

Ah that makes sense!

pez 2021-03-16T15:44:47.012Z

We’ll use the native one eventually, but we have run into issues with that work. Right now it is using the .jar.

2021-03-16T15:49:07.014300Z

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.

🎉 2
2021-03-16T15:49:44.014800Z

Thanks again for the help. What are some of the issues getting the graal version to work?

bringe 2021-03-16T15:56:54.017500Z

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.

bringe 2021-03-16T15:58:14.018600Z

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.

pez 2021-03-16T16:01:42.022300Z

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. 😃

👍 1
az 2021-03-16T16:57:48.025700Z

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

bringe 2021-03-16T17:04:10.025900Z

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?

bringe 2021-03-16T17:08:56.026300Z

And then when typing I see the doc string like this

bringe 2021-03-16T17:09:43.026700Z

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

bringe 2021-03-16T17:10:14.026900Z

It's a toggle so it'll keep showing doc strings after you do that

bringe 2021-03-16T17:11:19.027200Z

Actually that's also mapped to toggleSuggestionDetails so that may be what's doing that

2021-03-16T17:16:10.027500Z

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.

2021-03-16T17:18:35.027700Z

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.

pez 2021-03-16T17:30:38.027900Z

😃

az 2021-03-16T17:32:37.028100Z

az 2021-03-16T17:33:46.028500Z

Hi @brandon.ringe, thank you. Yes, connected to clojurescript repl, when I hit ctrl+space this is what I get

bringe 2021-03-16T17:38:44.028700Z

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.

az 2021-03-16T17:39:10.028900Z

Will do thank you

👍 1
pez 2021-03-17T12:19:40.008900Z

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. 😃

❤️ 1
bringe 2021-03-17T16:08:50.009300Z

Great job with the video! Still watching right now but I'm loving it.

❤️ 1
bringe 2021-03-16T17:53:24.029600Z

I had not, thanks!

pez 2021-03-16T18:03:32.029800Z

Thanks a lot, @seancorfield! I’ve replied now. Been waiting for that question almost.

bringe 2021-03-16T18:10:28.030Z

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.

bringe 2021-03-16T18:10:45.030200Z

Just a guess though. I'm interested to see what's unclear.

bringe 2021-03-16T18:11:50.030400Z

Also my guess could be way off 😄