This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-11-10
Channels
- # beginners (6)
- # calva (1)
- # cider (17)
- # clj-kondo (10)
- # clojure (4)
- # clojure-austin (3)
- # clojure-spec (3)
- # clojurescript (40)
- # clojurex (17)
- # core-async (10)
- # cursive (1)
- # data-science (2)
- # datomic (15)
- # emacs (10)
- # fulcro (15)
- # funcool (1)
- # graalvm (15)
- # joker (3)
- # nrepl (34)
- # off-topic (10)
- # pedestal (3)
- # rewrite-clj (6)
- # spacemacs (5)
- # sql (11)
Anyone knows if we can do the same with Cider?
There's semantic-stickyfunc
, but it only works with function definitions, not the current expression.
(defun my-clojure-get-current-expression ()
(or (save-excursion
(ignore-errors
;; Find outside of surrounding expression
(while (and (not (looking-at "(")) (looking-back "'"))
(unless (sp-backward-up-sexp)
(error "No enclosing expression")))
;; Jump to first symbol
(forward-symbol 1)
(symbol-at-point)))
""))