2

This CIDER feature only seems to work after executing cider-jack-in:

M-. Jump to the definition of a symbol. If invoked with a prefix argument, or no symbol is found at point, prompt for a symbol.

When I open a new clj file and it just says cider[not connected] the M-. key combo gives me Wrong type argument: stringp, nil

Is it possible to use this feature without starting and connecting to a REPL? Is there another way to get the same behavior without using CIDER?

kevincasey
  • 249
  • 2
  • 12

1 Answers1

2

CIDER doesn't have such ability, because it performs look-ups of symbol definitions using metadata attached to vars:

> (defn x [] 0)
#'user/x
> (meta #'x)
{... :line <line_nuber>, :file <file_path> ...}

Obviously, to have metadata attached you need to start the REPL and evaluate symbol definitions.

Without REPL you may try using rgrep (after placing cursor on needed symbol):

M-x rgrep <RET>

However, this is only a textual search. It will give you all occurrences of symbol in the specified directory (no namespace resolution as well).

OlegTheCat
  • 4,443
  • 16
  • 24