emacs

gunnar 2025-08-27T08:46:34.216979Z

I'm using clojure-lsp via eglot, and xref-find-definitions works fine for symbols in the project, but it doesn't work if I'm navigating to a function in a library. Emacs just shows a blank buffer with a ns like the following:

(ns my.project.zipfile:.Users.gunnar..m2.repository.no.cjohansen.powerpack.2025.01.21.powerpack-2025.01.21.jar::powerpack.dev)
... where was the ns I was trying to visit. I'm thinking that there's something obvious that I'm not seeing here, so any help is appreciated 🙂

✅ 1
hkjels 2025-08-27T11:10:00.992709Z

I assume you get the correct jump behavior if you start Emacs with: emacs --no-init-file . Probably a mix of a local class-path issue and some package that auto-generates a ns declaration when a new clj file is created.

gunnar 2025-08-27T11:12:17.871459Z

If I use Cider for xref then everything works as expected. (Should have mentioned that.)

gunnar 2025-08-27T11:17:44.206279Z

I'll try creating a clean and minimal config and see if my config is to blame. Thanks!

ericdallo 2025-08-27T11:43:00.484829Z

it looks like clojure-lsp is not finding http://powerpack.dev in classpath or something, check https://clojure-lsp.io/troubleshooting/#server-log for the classpath used by clojure-lsp, it will help understand

gunnar 2025-08-27T13:02:59.716989Z

Thaks for the tip, @ericdallo. The classpath seems to be correct, though. I'll try with a minimal repro, both clj-project and emacs config, and if that fails, I'll try with lsp-mode instead of eglot. Will report back.

👍 1
gunnar 2025-08-28T06:16:26.063889Z

I created a repro with a basic clj project and minimal emacs config: • eglot has the same behaviour • lsp-mode works as expected So I digged on and found this: https://github.com/joaotavora/eglot/issues/661 It's a known issue, and it hasn't been solved yet, but it can be handled by installing and running jarchive-mode: https://sr.ht/~dannyfreeman/jarchive/#working-with-eglot Thanks again, @hkjels and @ericdallo for nudging me in the right direction 🙂

👍 2
hkjels 2025-08-28T11:45:11.691909Z

Ahh. I have jarchive-mode installed indeed.