Fork me on GitHub
#cider
<
2022-11-02
>
dev-hartmann14:11:55

just a quick question, cider jack in doesn’t respect my entry in dir-locals

dev-hartmann14:11:01

(cider-clojure-cli-global-options . "-M:repl")

dev-hartmann14:11:13

that’s what i have

dev-hartmann14:11:34

using cider jack in I get

dev-hartmann14:11:40

/opt/homebrew/bin/clojure -Sdeps '{:deps {nrepl/nrepl {:mvn/version "1.0.0"} cider/cider-nrepl {:mvn/version "0.28.6"} refactor-nrepl/refactor-nrepl {:mvn/version "3.5.5"}} :aliases {:cider/nrepl {:main-opts ["-m" "nrepl.cmdline" "--middleware" "[refactor-nrepl.middleware/wrap-refactor,cider.nrepl/cider-middleware]"]}}}' -M:cider/nrepl

dev-hartmann14:11:10

would have expected : -M:repl:cider/repl

jkxyz14:11:01

Have you verified the value of cider-clojure-cli-global-options in the buffer with M-x describe-variable?

dev-hartmann14:11:55

yes, it’s set

dev-hartmann15:11:48

Ok, i just found out it’s not picked up, globally it’s nil

dev-hartmann15:11:34

ok, neither global-options nor cli-aliases variables are picked up

dev-hartmann15:11:58

after changing I did a rever-buffer on the open buffer I was trying the jack in on

dev-hartmann15:11:14

hm, is there a way to check if dir-locals is loaded?

jkxyz15:11:42

I normally just kill the buffer (make sure it’s properly gone), reopen it, and inspect the variable

jkxyz15:11:14

I’d also check in the docs which variables do the thing you want - looks like there’s also cider-clojure-cli-aliases

dev-hartmann15:11:38

I think cli-alies is the correct one

dev-hartmann15:11:20

hm, still not picked up … restarted emacs completely

jkxyz15:11:19

Also check the value of enable-local-variables

jkxyz15:11:51

I think it should be t to warn you on unsafe local variables

dev-hartmann15:11:08

it’s set to t

jkxyz15:11:05

Not sure what else to check apart from the syntax of your dir-locals.el

dev-hartmann15:11:26

If I set the var via set-variable it works as expected

dev-hartmann15:11:54

(clojure-mode .  ((cider-preferred-build-tool . clojure-cli)
                   (cider-clojure-cli-aliases . ":repl")))

dev-hartmann15:11:05

that’s all there is to the .dir locals

jkxyz15:11:00

Hm what if you use nil instead of clojure-mode?

dev-hartmann15:11:43

nope, still not picked up

dev-hartmann15:11:16

hm, maybe doom emacs is the issue