Fork me on GitHub

Hi, quick question! I feel like I’m missing something fundamental about working with Calva. I’m coming from a strong Cider+Emacs background. I’ve run a repl from terminal, connected to it from Calva, and can successfully evaluate code. The problem, as shown in the following screenshot, is I can’t peek at a definition. Is there something special that needs to happen to make this work?


Hello, @dadair ! This should work. It is usually about getting the dependencies right. Cider is really good at injecting what it needs when jacking in, but Calva is lacking this so far. The readme has a link to a Getting Started page, which tries to help with this.


When the dependencies are satisfied you’ll get • documentation on hover • peek at definition if you press command while hovering • go to definition by command-clicking.


It might also be about making a first file evaluation, default key binding: ctrl+alt+v enter.


I’ve followed every instruction on the Getting Started wiki page, and made sure to evaluate everything, and I cannot get peek at definition and associated functionality 😞


Made sure Calva project root setting was appropriate, etc


I was able to make it work by moving the suggested ~/.lein/profiles.clj change into the actual project.clj. Not sure why the plugin was not being picked up in the global plugins.


Ah, thanks for sharing. Never encountered that one.


Random question, why such verbose key bindings? Is alt-enter or cmd-enter etc taken?


Good random question! I think I might have been a bit on the defence with keybindings when I started.


I opted for using a “Calva prefix” (`ctrl+alt+v`) and chord from there.

Marc O'Morain20:12:50

@pez I’ve been thinking about the nrepl dependencies recently. One of the nrepl commands lists the available nrepl commands. We could add some sort of feature detection / feature gating based on the advertised list. So if you don’t have the test nrepl middleware installed, the commands to run tests in the current ns could fail gracefully.


That sounds much better than what the situation today is, @marc-omorain