This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-26
Channels
- # announcements (17)
- # babashka (68)
- # beginners (8)
- # biff (14)
- # calva (25)
- # cherry (10)
- # clj-kondo (1)
- # clj-on-windows (12)
- # cljsrn (6)
- # clojure (134)
- # clojure-berlin (1)
- # clojure-europe (33)
- # clojure-nl (4)
- # clojure-norway (6)
- # clojure-uk (10)
- # clojurescript (9)
- # datalevin (8)
- # datomic (34)
- # docker (1)
- # emacs (31)
- # fulcro (6)
- # honeysql (8)
- # java (7)
- # joyride (14)
- # kaocha (7)
- # malli (11)
- # nbb (4)
- # off-topic (11)
- # pedestal (14)
- # rdf (53)
- # re-frame (6)
- # reagent (39)
- # reitit (2)
- # releases (9)
- # rewrite-clj (14)
- # shadow-cljs (97)
- # specter (1)
- # testing (5)
- # tools-deps (12)
- # vim (4)
- # xtdb (9)
trying out eglot today, since it was in the news lately. So far so good, most of the stuff that I used to dislike about it was fixed since last time I tried it. But there's still one important missing bit, it can't jump to defs inside a dependency like lsp-mode does.
then about the move to core emacs, personally I am not a fan, it makes pulling "nightly" changes a bit tricky and the discussions are scattered in 2 places now

there's a patch in the works for this tho : https://github.com/joaotavora/eglot/issues/661
As long as the clojure-lsp configuration value :dependency-scheme
is "zipfile"
(currently the default), then loading up this elisp allows you to navigate to jars https://git.sr.ht/~dannyfreeman/jarchive/tree/main/item/jarchive.el
the path it sends me to seems wrong: it's something like /foo/bar/baz/file:/home/mpenet/<...>. Without the prefix (current dir, it would work)
Can you view the contents?
(use-package jarchive
:straight (jarchive :type git
:host nil
:repo "")
:hook ((clojure-mode . jarchive-setup)
(clojurec-mode . jarchive-setup)))
I don’t know much about straight, but assuming it’s loaded, can you call M-x jarchive-setup
before using xref-find-definitions
?
Update: resolved the issue in dm. :dependency-scheme
was set to "jar"
.
@yyoncho made a POC of A Emacs fork implementing non-blocking and async JSONRPC support. I still need to test it myself, but he said is way faster than current Emacs sync JSONRPC support https://github.com/emacs-lsp/emacs

When I hover on the name of a declaration, like foo
in:
(def foo
,,,)
emacs will suggest in the minibuffer the complete name: my.namespace/foo
. How can I copy the complete name of an identifier in the clipboard?I don’t have a straightforward way to get it into the clipboard, but executing the command eldoc-doc-buffer
ought to open a buffer where you can copy the contents from.
Thank you! So that seems to work when I have no cider
open. Otherwise it returns:
def: ([def symbol doc-string? init?])
Huh, when cider is open does my.namespace/foo
still appear in the minibuffer?
so, that def: ...
stuff appear first, as I move the cursor my.namespace/foo
appears again
it seems that I'm getting two streams of information, but when I actually invoke the function I only get def: ([def symbol ...])
Yeah, I think some of it is coming from cider-doc
and not eldoc. You might try making sure the foo-form is evaluated by cider. And with that, using cider-doc
instead of eldoc-doc-buffer
That’s a ways off from just wanting it dumped into the clipboard though. You might be able to write a custom function to do it with what is available in cider.
Thank you for pointing me in the right direction @UDVJE9RE3! I ended up with:
(defun med/select-namespaced-symbol ()
(interactive)
(let* ((sym (symbol-name (symbol-at-point)))
(info (cider-var-info sym))
(docstring (cider--docview-as-string sym info)))
(kill-new (-first-item (s-lines docstring)))))