This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-10-19
Channels
- # announcements (2)
- # beginners (12)
- # cider (12)
- # cljsrn (1)
- # clojure (56)
- # clojure-italy (1)
- # clojure-sweden (2)
- # clojure-uk (3)
- # clojured (6)
- # clojurescript (16)
- # cursive (1)
- # data-science (3)
- # datomic (8)
- # emacs (18)
- # figwheel-main (1)
- # graphql (5)
- # jobs (10)
- # luminus (4)
- # nrepl (27)
- # off-topic (5)
- # pathom (7)
- # shadow-cljs (66)
- # sql (40)
- # tools-deps (1)
- # vim (6)
What is cider function that can work like cider-find-var but for symbols which are functions arguments? For example with this fn: (defn me [a b] (+ a b)) if my cursor is on symbol a on line 2, what will take me to the definition of a in line 1? Thanks
I usually just use text-based commands for that, like the auto-highlight-symbol
package
ahs-forward
and ahs-backward
in particular, inside a hydra which makes visually jumping around very fast
thanks, I am using something similar to yours (`#` or *
in spacemacs), but it feels lacking. I wish I have a function that jumps straight to the argument definition like cider-find-var does for other symbols other than function arguments.
Hmm, you could probably look at cider--parse-and-apply-locals
for reference and hack together something of the sort
For myself, what I'd find useful is a cider-find-ns-var
command that would completing-read all the vars in scope in the entire project, similar to Emacs' find-function
/ find-variable
@qythium If I recall correctly cider-find-var
actually does this. Just press TAB
. đŸ™‚
Now that it’s easy to parse a method definition using parse-clj
we can provide some lookup of locals relatively easy.
when you create a test namespace file, it gets created with a specific header, i.e. it automatically makes something like:
(ns my-app.foo
(:require [clojure.test :as t])
I would like to change this so it is always like this:
(ns my-app.foo
(:require [clojure.test :refer [deftest is testing]])
can somebody please point me to the relevant elisp code that is responsible?