This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-08
Channels
- # announcements (8)
- # babashka (11)
- # beginners (63)
- # calva (1)
- # chlorine-clover (1)
- # cider (18)
- # cljfx (4)
- # cljs-dev (18)
- # clojure (17)
- # clojure-europe (20)
- # clojure-spec (2)
- # conjure (2)
- # data-science (6)
- # datomic (7)
- # depstar (17)
- # etaoin (2)
- # events (2)
- # fulcro (28)
- # graalvm (2)
- # graphql (3)
- # jobs-discuss (5)
- # off-topic (18)
- # pedestal (5)
- # reagent (6)
- # reveal (2)
- # shadow-cljs (39)
- # spacemacs (7)
- # xtdb (13)
I want to NOT switch to the REPL buffer on insert. So I set (via customize) cider-switch-to-repl-after-insert-p
to nil
in my ~/.emacs.d/init.el
file. That works (in the sense that the cursor stays in the source buffer, when I do C-c M-p
). However, it says that this variable is deprecated and that I should use cider-switch-to-repl-on-insert
instead. However, when I set cider-switch-to-repl-on-insert
to nil
via customize in my ~/.emacs.d/init.el
that does not work (in the sense that my cursor does shift to the REPL buffer). Any ideas what I might be doing wrong?
What version are you on? I see we have only cider-switch-to-repl-on-insert
these days.
Ah, I see what's wrong. Actually we have two defcustoms in the code for this. I'll fix it.
@U051BLM8F Thanks. I am on the latest stable release.
I think you want to ignore the deprecation warning. I think I may have gotten that backwards. After insert is the newer one. On insert was ambiguous and deprecated
I don't see a deprecation warning at all in the code, but I'm pretty sure cider-switch-to-repl-on-insert
is the name of the defcustom.
Nope, you did it right. I double-checked with the changelog and what's actually used in the code.
Hi, I'm trying to run Reveal
with cider
using tool.deps
but I'm stuck.
I added this to my global deps.edn
:reveal-nrepl
{:extra-deps {vlaaad/reveal {:mvn/version "RELEASE"}
nrepl/nrepl {:mvn/version "RELEASE"}}
:main-opts ["-m" "nrepl.cmdline" "--middleware" "[vlaaad.reveal.nrepl/middleware]"]}
and I created a .dir-locals.el
in the project I'm trying to run Reveal.
((clojure-mode . ((cider-clojure-cli-global-options . "-A:reveal-nrepl"))))
When I run cider-jack-in-clj
this is what gets executed:
/usr/local/bin/clojure -A:reveal-nrepl -Sdeps '{:deps {nrepl {:mvn/version "0.8.1"} refactor-nrepl {:mvn/version "2.5.0"} cider/cider-nrepl {:mvn/version "0.25.3"}}}' -m nrepl.cmdline --middleware '["refactor-nrepl.middleware/wrap-refactor", "cider.nrepl/cider-middleware"]'
Shouldn't the middleware vector contain vlaaad.reveal.nrepl/middleware
? Am I missing something? I also tried "-M:reveal-nrepl"
in the .dir-local.el
file.I doubt main opts from a profile get mixed together like that. They certainly aren’t merged. Use a prefix Arf when jacking in and just add the profile and args there. I think there are some args you can adjust but don’t know them offhand
Cider connect is a simpler approach. Jack-in dependencies over-rides the aliases I raised this issue and suggested fix, but haven't had any feedback as to if this would be an okay fix https://github.com/clojure-emacs/cider/issues/2922 Switching off the dependencies for jack-in and still use an alias via a global options variable in dir-locals requires setting several variables
((clojure-mode . ((cider-preferred-build-tool . clojure-cli)
(cider-clojure-cli-global-options . "-M:lib/cider-nrepl:inspect/rebl:middleware/nrebl")
(cider-jack-in-dependencies . nil)
(cider-jack-in-nrepl-middlewares . nil)
(cider-jack-in-lein-plugins . nil)
(cider-clojure-cli-parameters . ""))))
If the suggested fix is acceptable, this could be replaced by a single variable, to switch off the auto-injectionsometimes when I'm jacked in to a shadow-cljs session, I can do eval in the buffer, and sometimes I can't. At first i thought it was because there was an error, so I'd refresh and see if one is thrown, but now I'm just eval-ing either gives me nothing (in a cljs file) and it always returns nil in a clj file that I'm using for a macro.