New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jump-to-definition doesn't work in Babashka #3456
Comments
I'd say the problem lies in the But the Given that Babashka nREPL server only implements (an important subset) of the base supported nREPL operations, but no other extensions at all (unless you make it load additional middleware extensions), CIDER disables its own completion machinery, and |
When hitting nREPL limitations with babashka, you can now use You can maybe even write some elisp to add |
Thanks for the observation! By customizing |
no difference that i can tell |
Got it. Anyway, assuming that babashka doesn't implement cider-nrepl ops as analyzed by @iarenaza , then it is to be expected that most things won't work. We have some fallbacks though, as reflected in this issue: #2611 Apparently, this is what is supported as of today:
So in theory, jump to definition is supported. Maybe at some point we had a regression / oversight that omitted these fallbacks. |
After the fix, I could see jump-to-def working without cider-nrepl with:
That should be all needed for bb compat. I saw that bb already implements the relatively new Available in CIDER master, and as a MELPA snapshot within a couple hours. |
@vemv I really appreciate your fast PR, but I think it broke the babashka repl entirely? I get this on
I think JVM projects are broken, too. On opening .clj files I get
and upon
|
I think you need a quite recent version of [1] I see that vemv just tagged 5.17.0 a few hours ago, with some additional changes around |
You're absolutely right, @iarenaza, thank you. At least on my machine, M-. on vars defined locally now jumps to the top of the buffer/
|
Please (If I had to guess, there's a difference between the expected and actual format of bb's |
https://gist.github.com/daveliepmann/c4fc9e4ee0e10296e1144a031afad5ea |
Thanks much! As seen in the last request/respons cycle, your cider.el requested for
It says the |
The CIDER for Babashka docs imply that vars defined by the running program should support jump-to-definition:
However, this appears not to be the case. Clojurians thread
Expected behavior
I expect to be able to define a var and then jump to its definition from any of its usage sites.
Actual behavior
Jump to definition does not work for any var, whether built-in or defined locally.
Steps to reproduce the problem
bb nrepl-server
cider-connect
foo
, M-. --> instead of jumping to definition, minibuffer displays "Visit tags table..." promptEnvironment & Version information
CIDER version information
Include here the version string displayed when
CIDER's REPL is launched. Here's an example:
Lein / Clojure CLI version
n/a
Emacs version
GNU Emacs 28.2 (build 1, aarch64-apple-darwin22.1.0, Carbon Version 169 AppKit 2299) of 2022-12-10
Operating system
macOS Ventura/13.5.1 (22G90)
JDK distribution
openjdk 17.0.2 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)
The text was updated successfully, but these errors were encountered: