Hi, I added [ring-cors "0.1.13"]
in my dependencies. But, in core.clj
, cider cannot autocomplete the ring.middleware.cors
when I try to require it. Anyone how to fix it? (`clojure-lsp` can find the ring.middleware.cors
candidate)
Unless you have some form of hot-load library to load in new dependencies into a running REPL, the the REPL should be restarted (stop, start) to pick up the new dependency.
Thanks @jr0cket. I am doing the (stop, start) approach, and can load the namespace successfully. The problem is there is no autocompletion of ring.middleware.cors
from cider’s company mode (after injection). It is not really a big deal. I am just wondering whether there are some easy fix for the autocompletion.
How do I eval something in the code which yields a larger result, to be pretty-printed to the REPL - sort of equivalent to C-x e..?
Thanks!
Sorry, I just saw that cider-insert-last-sexp-in-repl
does the trick 🙂
there are some nice options around that to make it evaluate for you
(setq cider-invert-insert-eval-p t)
(setq cider-switch-to-repl-on-insert nil)
Thx @dpsutton