Fork me on GitHub
#cider
<
2019-10-09
>
r0man18:10:28

@dominicm @borkdude I got a step further with the problem I described above. All my problems went away when I removed clj-refactor from my setup. But now I want clj-refactor back 😕

dominicm18:10:14

I may know the problem

dominicm18:10:41

There's an issue opened by Malcolm Sparks on one of the refactor repos

dominicm18:10:11

In big projects, the ast warming may still be happening as you are doing things, making 💥

ag22:10:21

Hey guys, anyone knows the best way to get fully-qualified name of the symbol-at-point?

ag22:10:03

oh… shoot… seems I already asked this question and I already have it in my config:

(defun cider-fully-qualified-symbol-at-point (args)
  (interactive "P")
  (let ((s (cider-interactive-eval (concat "`(" (cider-symbol-at-point t) ")"))))
    (kill-new s)
    (message s)))

ag23:10:23

meh, it doesn’t always work ;(

ag23:10:23

Okay, I did a bit of digging and made one that works:

(defun cider-fully-qualified-symbol-at-point ()
  (interactive)
  (let ((cb (lambda (x)
              (when-let ((v (nrepl-dict-get x "value"))
                         (s (replace-regexp-in-string "[()]" "" v)))
                (kill-new s)
                (message s)))))
    (cider-interactive-eval
     (concat "`(" (cider-symbol-at-point t) ")")
     cb)))
updated it: apparently quoting is better than using resolve - that way it works for keywords as well