Fork me on GitHub

is there any way to show documentation of a function using only the keyboard I usually hover the mouse over the function name and it pops up, but it will be a bit more practical for me if there is some keyboard shortcut to do it


There’s a VS Code command for showing the hover, I think it is named Show Hover. On Mac it is default bound to cmd+k cmd+i, maybe on Windows/Linux that’ll be ctrl+k ctrl+i.


perfect! thank you!


This is also useful for inspecting the result of an evaluation.

Lukas Domagala13:12:57

@U0ETXRFEW vscode doesn’t allow “richer” tooltips yet, right? something like a table or graphic i mean


Actually there was a change recently to the markdown allowed in the hovers. It might have opened up for at least slightly richer content. I haven’t investigated yet.

Lukas Domagala13:12:51

nice, i’ll have to look into that, thank you!


Awesome. What I’d like to know first about that is if we can use detail/summary tags now. We couldn’t before, and it has stopped me from presenting data structures in a collapsable manner.

Lukas Domagala14:12:43

uh, i’m sure i don’t know enough about calva to tell you anything about that, but i’ll have a look at the new feature and come back to you


Yeah, it might take some digging in Calva to actually use it. But what you need to know is that we populate the hovers using markdown. And it used to be a pretty limited markdown, where the html tag <details> couldn’t be used. If that tag can now be used, a nice possibility opens. 😃

Lukas Domagala15:12:30

so according to this these are our options: ALLOWED_TAGS: [‘ul’, ‘li’, ‘p’, ‘b’, ‘i’, ‘code’, ‘blockquote’, ‘ol’, ‘h1’, ‘h2’, ‘h3’, ‘h4’, ‘h5’, ‘h6’, ‘hr’, ‘em’, ‘pre’, ‘table’, ‘thead’, ‘tbody’, ‘tr’, ‘th’, ‘td’, ‘div’, ‘del’, ‘a’, ‘strong’, ‘br’, ‘img’, ‘span’], ALLOWED_ATTR: [‘href’, ‘data-href’, ‘target’, ‘title’, ‘src’, ‘alt’, ‘class’, ‘style’, ‘data-code’, ‘width’, ‘height’, ‘align’] no details sadly, but an optional “always details” hover effect, maybe switchable through a hotkey, for inline results would be something i’d use :)


We show all details today. The details tag is about hiding them 😃

Lukas Domagala15:12:00

ah whups 🙂 i thought you wanted to display it in a rendered way, for example in a table


Yeah, it would be wonderful to present rich results. Just that I think it is almost impossible to consume large result data structures as it is now.

Lukas Domagala20:12:42

yeah I think most people that active already use portal or reveal for anything that’s not trivial, but that’s sad for any newbie that doesn’t know about them. having some middle ground between a basic repl and a full blow window would be helpful for the beginner experience


just getting a new macbook and rethinking my setup. i am a long time intellij user, but vscode+calva feel like a space where i could contribute more to the dev experience. Are there any roadmaps / docs on calva/vs code extension possibilities ( specially web views) that you could share? many thanks


There’s not really a roadmap, but for contributing to Calva, see here: For general docs on Calva, see


Clojure characters that are either \{ \[ \< \( seem to disturb the syntax highlighting, see:


If you post it as text it is much easier to try reproduce. Ask @U9A1RLFNV about it. 😃

😄 1

Yeah, I'll post the text, but the text wouldn't have shown the colours 😄 This

(defn get-remaining [open [c & r]]
  (if (nil? c)
    (cond (#{\{ \[ \< \(} c)
          (recur (conj open c) r)

          (#{\} \] \> \)} c)
          (if (= c (matcher (peek open)))
            (recur (pop open) r)
Shows as :


Looks like so for me.


hmmm. could be my VS code theme?


Even a basic map shows wrong for me

(let [x {\{ \[}])
SHows as:


Maybe you have VS Code bracket colors on? I can’t fully reproduce, but this looks a bit funny:


I'll experiment with my chosen theme and see if that is it


I’m using Github Dark Default, btw. Though I doubt a bit it is about the theme.


you are right, I did have a bracket colorizer! Turned iff off and its perfect now




It should be reported on the VS Code repo, I think. There might be something Calva can do about it.


Though, even with Calva disabled it looks funny.


oh yeah, the \{ is blue, and its coloured the closing } on the set blue, when it should be purple


The cursor is on that empt line. Extra interesting that the bracket matching highlights a yellow and a blue paren. 😃


I’ll report it on VS Code. I’m curious if Calva can fix it.


More fun that i am not entirely sure if its my machine


Dec 10, 2021 11:25:56 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 155
Dec 10, 2021 11:27:46 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 339
Dec 10, 2021 11:27:46 AM org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer fireError
SEVERE: Unable to invoke no-args constructor for class org.eclipse.lsp4j.ShowDocumentResult. Registering an InstanceCreator with Gson for this type may fix this problem.
java.lang.RuntimeException: Unable to invoke no-args constructor for class org.eclipse.lsp4j.ShowDocumentResult. Registering an InstanceCreator with Gson for this type may fix this problem.
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.fromJson(
	at org.eclipse.lsp4j.jsonrpc.json.adapters.MessageTypeAdapter.parseResult(
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(
	at org.eclipse.lsp4j.jsonrpc.json.MessageJsonHandler.parseMessage(
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.handleMessage(
	at org.eclipse.lsp4j.jsonrpc.json.StreamMessageProducer.listen(
	at java.util.concurrent.Executors$
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Method.invoke(
	... 19 more
Caused by: java.lang.IllegalArgumentException: Class org.eclipse.lsp4j.ShowDocumentResult is instantiated reflectively but was never registered. Register the class by using org.graalvm.nativeimage.hosted.RuntimeReflection
	at sun.misc.Unsafe.allocateInstance(
	... 22 more


Where are you seeing this information?


just in the output window


If you can provide an example project which we can reproduce the issue with then we could troubleshoot further.

Antonio Bibiano19:12:15

sorry peeps, not sure if this is calva specific, but I was wondering what is needed to show the source code of java stuff

Antonio Bibiano19:12:51

like I love checking the source of stdlib functions but sometimes they refer to clojure.lang.RT or java.lang.Number for example


According to the getting started repl it should be possible to peek the source of those too.


It was cmd + hover or alt + hover, I think. Just read it yesterday 😄

Antonio Bibiano19:12:31

i get a tooltip with "no definition found" but it might be an issue with my setup


You need the Java sources installed, from what I know


This happens by default on some systems, I think, but on others they have to be manually added


I’ll make an issue to add info about this in the Calva docs.


Oh, I added an issue for that already 😂


Added it to my project board so it’s more visible


Added a note in the docs pointing to that thread here:

❤️ 1
Lukas Domagala21:12:42

mhh, I don’t seem to understand the linked comment. i have in the lib folder of the jvm install and have read access and cant “go to def” on java.lang.Number for example


I’m not sure what the issue is, but go to def might have a bug from a recent change. See this thread: I don’t think I’ve ever actually gotten that feature to work (don’t remember if I tried the suggestion in the comment). If it’s working for Clojure defs though, feel free to create an issue in the repo and we can troubleshoot there.


Then we could try to nail down a solution and document it.

Lukas Domagala22:12:22

k, going into clojure jars seems to still work, i’ll create an issue. thanks

Lukas Domagala22:12:56

it’s the strangest thing, it just worked for two things, then i wanted to check my calva version, went back to the file and its broken for everything again, without a reload

Lukas Domagala22:12:43 very strange reproducibility, sometimes it partially works and sometimes not at all

👍 1

Not sure if this is a Calva question or a clojure-lsp question. How do I find all references of a specific arity of a function?. Right now in Calva, with the cursor on the function name, I can find all references of all arities of the function. I tried placing the cursor between the ( and [ for each arity and searching for references. That didn't show any references, I am guessing that doesn't work.


there is no way ATM to achieve that via clojure-lsp

🆗 1

it's possible to add that, but not sure how we would achive that following the LSP protocol