Fork me on GitHub
#cider
<
2020-09-21
>
yh00:09:16

Hi, I added [ring-cors "0.1.13"]in my dependencies. But, in core.clj , cider cannot autocomplete the ring.middleware.corswhen I try to require it. Anyone how to fix it? (`clojure-lsp` can find the ring.middleware.cors candidate)

practicalli07:09:53

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.

yh17:09:34

Thanks @U05254DQM. 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.

kingcode19:09:23

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..?

practicalli12:09:10

The cider inspector is a great tool for paging through large results and can also navigate nested data structures https://docs.cider.mx/cider/debugging/misc.html#_inspecting_values Some screenshots here https://docs.cider.mx/cider/debugging/misc.html#_inspecting_values

kingcode19:09:48

Sorry, I just saw that cider-insert-last-sexp-in-repl does the trick 🙂

dpsutton19:09:58

there are some nice options around that to make it evaluate for you

dpsutton19:09:29

(setq cider-invert-insert-eval-p t)
(setq cider-switch-to-repl-on-insert nil)

kingcode22:09:58

Thx @dpsutton