简体   繁体   中英

Can't switch to repl in spacemacs cider (Clojure)

In spacemacs, I am able to start a cider repl with cider-jack-in : it says 'Connected.' followed by a quote, as expected. But then cider-switch-to-repl-buffer does not open a repl buffer, and just produces the following message:

Invalid function: (repl (or the-repl a-repl))

Googling 'cider "invalid function repl"' produces only a cider issue relating to nim-mode ( https://github.com/clojure-emacs/cider/issues/1712 ), which is not one of the configuration layers I have installed.

I am able to run the repl from the terminal using lein repl without issue.

I came across the following 'solution' while trying to debug this issue. I have no idea why it works and it's not very satisfying, but it does seem to resolve the problem.

  1. In spacemacs, activate debug mode with SPC t D
  2. Try to switch to repl buffer with SPC mss
  3. In the debug frame, hit ENTER over (repl (or the-repl a-repl)) to open cider-mode.el .
  4. Make any edit to cider-mode.el and save.
  5. Undo the edit just made and save.
  6. Restart spacemacs.

After doing this, SPC m ' ( cider-jack-in ) followed by SPC mss ( cider-switch-to-repl-buffer ) opens the repl buffer as desired.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM