Fork me on GitHub
#calva
<
2018-12-03
>
dadair18:12:42

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? https://www.dropbox.com/s/1t1etgypoq8zoxw/Screenshot%202018-12-03%2011.56.22.png?dl=0

pez19:12:20

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.

pez19:12:42

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.

pez19:12:00

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

dadair22:12:15

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 😞

dadair22:12:42

Made sure Calva project root setting was appropriate, etc

dadair23:12:34

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.

pez05:12:31

Ah, thanks for sharing. Never encountered that one.

orestis19:12:07

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

pez20:12:48

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

pez20:12:46

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.

pez20:12:40

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