Fork me on GitHub
#cider
<
2016-02-04
>
martintrojer09:02:42

hello fellow cider drinkers;

martintrojer09:02:11

is there a way to do ‘jump to symbol’ ?

martintrojer09:02:33

I.e. take me to funcion FOO nomatter in what file it might be?

martintrojer10:02:02

or is that projectile TAGS thing?

keeds10:02:30

@martintrojer: M-. ?

keeds10:02:15

cider-find-var

martintrojer10:02:16

ohyeah, didn’t explain properly, that’s the one, but I want start typing the name of the var

martintrojer10:02:25

and then IDO/helm kicks in etc

keeds10:02:39

That would be nice... cider-find-var does tab-completion so should be possible?

martintrojer11:02:22

one annoying detail with this approach is that you have to remember the namespace of the var

martintrojer11:02:38

unless its referred into the current ns

martintrojer11:02:09

so kind of working, but not very useful

martintrojer11:02:54

its a bit of a Cursive killer-feature atm since we can’t do this properly in Cider.

bozhidar13:02:59

you can’t do this without loading the code in cider

bozhidar13:02:22

I mean we can certainly change the tab completion to be a list candidates that would work with ido/helm

bozhidar13:02:39

but you’ll also see symbols from loaded namespaces

bozhidar13:02:59

cursive does static analysis of the code, but we don't

bozhidar13:02:16

and for reasons I’ve repeated hundreds of times over the years

bozhidar13:02:26

it’s unlikely we’ll be doing something like this any time soon

bozhidar13:02:46

but clj-refactor loads all your namespaces for its static analysis

bozhidar13:02:31

so for me the actionable point is to rework the way symbol candidates are presented

bozhidar13:02:54

a while back using tab completion seemed like a good idea to me

bozhidar13:02:00

but now I’m not so sure

bozhidar13:02:51

I just wanted to avoid having a 2-step completion (ns first, var afterwards) and the alternative of having too deeply nested vars as completion candidates (which probably doesn’t happen very often in practice)

martintrojer14:02:08

the requirement of having the code/namespace loaded is not a big problem (we can live without static analysis)

martintrojer14:02:11

just having something in the nrepl middleware to query for matching vars and feeding them to IDO would be perect.

martintrojer14:02:08

that way we don’t have to dump info about every single var into elisp.

bozhidar14:02:10

we already have apropos

bozhidar14:02:18

and doc-apropos, btw

bozhidar14:02:23

which do exactly this

bozhidar14:02:35

try C-c C-d C-a

bozhidar14:02:10

with the small difference that the result is rendered in a dedicated buffer

bozhidar14:02:21

feel free to file a ticket about this

bozhidar14:02:45

repurposing the apropos data for ido should be trivial

martintrojer14:02:12

cool, this helps me already. what is the key to go to the definition from the cider-apropos window?

martintrojer14:02:14

ah, there is a source ‘button’ in the 2nd window

bozhidar14:02:02

(you can also type s in the second window)

martintrojer14:02:38

so basically feeding the aprops to ido as I type, and when I press enter it would take me to the source.

martintrojer14:02:53

that is exactly what I was looking for simple_smile

curtosis19:02:54

I'm trying to set up cider w/boot for the first time, and I keep getting this (spurious) message: Please, install (or update) cider-nrepl 0.10.2 and restart CIDER

curtosis19:02:17

It looks like https://github.com/clojure-emacs/cider/issues/920 but it's not clear what the solution actually was (yay github issue threads!)

malabarba23:02:57

How did you configure boot to use cider-nrepl?