How can I jump to a protocol implementation rather than definition?
This was recently covered in this thread https://clojurians.slack.com/archives/C0617A8PQ/p1729784739018019 I believe the TL;DR is that Cider doesn't support it (yet)
Since extend-protocol/extend-type and the like don't store their location metadata into the protocol, it is not quite possible using runtime introspection. I think tools like LSP have such ability.
Ah, ok. I'm trying to avoid LSP lol. Maybe I'm stuck
Yes, I use clojure-lsp (via eglot) for this.
I'm curious why you're trying to avoid LSP though 🙂
I did try it for a bit. A colleague at work runs cider and lsp. I guess I just prefer the lightest setup that does the job, and I've seen lsp sometimes make a nuisance of pop-up annotations. I'm sure they could be disabled, but either way it seems a lot of work and overhead to run cider alongside lsp. That's my 'strong opinion, lightly held' and I'm always willing to learn a new or improved better way.
I was of the same impression as you, @jmckitrick , but ended up doing the job last year. I ended up turning off most lsp UI elements, but there are some real gems in there, like the "unused var" linter. My cider+lsp setup is here: https://github.com/magnars/emacsd-reboot
I will most certainly give it a second look now
I tend to use grep for these things, works well enough for some variation of well and enough.
That's my current/fallback plan
It just gives me an inferiority complex around my colleagues running Cursive et al lol
If you follow some specific conventions in your code, maybe you can do more accurate jumping. I tend to favour greppability in code, so a lot of my code is meant to work with primitive tools.
I totally agree with you, and I used to be the guy that always put C/C++ function names at the beginning of their own line so I could grep for '^foo'
Glad we have ^(defn name for that.
I switched to common lisp and clojure just for that 😜
@jmckitrick you may want to try LSP via Eglot. The experience is more "bare" than lsp-mode. Here's how I set it up: https://github.com/stig/dotfiles/blob/trunk/emacs/init.el#L444-L470
@stig328 I'll check that out