Closed frenchy64 closed 3 years ago
Seems like a sound approach. Note that codepath is the fallback for when cider-nrepl is missing, so it might behoove you to investigate what's up with that.
Ah, good point. I often just live without it, so the fallback is for people like me :)
The codepath was in a different place than I expected, I'm less sure it's related to middleware now. https://github.com/tpope/vim-fireplace/pull/394
A simpler solution might be to toss a require into this initialization code:
This code only runs if there's no cider-nrepl.
Actually this code is doing goofy eval shenanigans on the response so you will have to be mindful to avoid that. Putting (clojure.core/require 'clojure.repl)
at the very end ought to do it.
Seems to work putting it at the end! Updated the PR.
I don't think this is a problem with
lein repl
, but other tools like Clojure CLI don't automatically loadclojure.repl
. UsingK
in normal mode throws:I then need to
(require 'clojure.repl)
manually to have K work.I think this is fixable by changing calls like
(#'clojure.repl/namespace-doc ...)
to an inlining ofclojure.core/requiring-resolve
(which is a newer Clojure function and shouldn't be used directly for compatibility):