Fork me on GitHub

@lukas.block For long strings, nothing cider can do about it. You can check some emacs built-in modes though: toggle-truncate-lines and visual-line-mode. For app-db, I'm not really sure what's the issue, a screenshot would be good. In general, if the object doesn't pprint nicely, I use cider-inspect (binded to C-c M-i by default)


Thank you a lot. I didn't know about cider inspect this is a really helpful enhancement of my work flow 😊


Hi 👋 I started a shadow-cljs project with: shadow-cljs watch frontend --config-merge '{:closure-defines {vizards.nobil.core/APIKEY "123"}}' which works fine but when I try to run cider-connect-cljs, cider tries to run

(do (require '[shadow.cljs.devtools.api :as shadow]) (shadow/watch :frontend) (shadow/watch :--config-merge) (shadow/watch :'{:closure-defines {vizards.nobil.core/NOBILKEY "123"}}') (shadow/nrepl-select :frontend))
Is this a bug or do I need to call cider differently?


I’m assuming you have a dir locals file that sets some values. There’s probably a cljs repl type and a startup form in there


Yes thanks, I deleted my dir locals file and now I get a different error so at least there’s some progress 🙂 I initially tried to configure --config-merge via dir locals but failed to do so, do you know how to configure that properly?


Is there a way to make cider display a reagent component arguments? [my-comp arg1 arg2] (eldoc)


Why did you delete that file. It sounded like it had some goodies in it. But it looks like it’s calling watch twice which is no good


Looks like you just need to tweak the custom cljs command


I tried soo many different configurations to make this work in the last hour that deleting the file felt really good 😄 I tried to overwrite the custom cljs command with

((clojurescript-mode . ((cider-shadow-cljs-command . "npx shadow-cljs --config-merge '{:closure-defines {vizards.nobil.core/APIKEY \"123\"}}'"))))
now shadow-cljs starts but closure-defines is not set


ah yeah that's no good


(setq cider-shadow-cljs-parameters "--config-merge '...'") should do it for you


you've set the executable to use with cider-shadow-cljs-command.


i've got an issue open to kinda clean all this stuff up


or document it so this is far easier.


but in general there are knobs for the-actual-executable some-options middleware stuff cider-does-stuff-here final-options-passed-in and you just want some final trailing options so that's what you want


But cider-shadow-cljs-parameters is set to server if I replace it with parameters no supported shadow-cljs action is found


you custom set it to server?


(I also tried (setq cider-shadow-cljs-parameters "server --config-merge '{:closure-defines {vizards.nobil.core/APIKEY \"123\"}}'") but this is ignored as well)


(just a heads up your api key may be public above)

👍 3

ok. give me one second to go see how shadow expects this. in the meantime some dir locals like the following should work

((nil . ((cider-default-cljs-repl . custom)
         (cider-custom-cljs-repl-init-form .
                                           "(do (require '[shadow.cljs.devtools.api :as shadow])
                                               (shadow/watch :your-app {:config :here})
                                               (shadow/nrepl-select :your-app))"))))


ok. i'm guessing you can't pass a config merge in to server as config is per build, not global?


possibly the easiest thing to do: 1. in a terminal run the exact watch command you want with the config-merge. ensure that cider/nrepl is on the command line -d cider/cider-nrepl "0.25.8". There should be an example at the top of repls of the jack-in command. 2. cider-connect-cljs and choose shadow-select and the watched build


I finally made it work with shadow-select thanks! (I did not work work with the custom REPL since my REPL tried to evaluate my closure-defines variable which does only exist in the cljs REPL but not in the clj REPL. I tried to quote it but this resulted in closure-defines being ignored. But at least it works with shadow-select 🙂 )


No I am still not able to make it work 🙈 Unfortunatly I have to leave now. But I am sure it will work by following your instructions when I stop programming in anger and rechecking all my local setup 😁 Thanks so much for your help I will retry it tomorrow

parens 3

hi all, i'm using cider-nrepl via vim-fireplace for cljs development. i'm having some trouble with commands that use the info op. basically when i have the following ns:

(ns my-ns.spec
    [clojure.spec.alpha :as s :refer-macros [coll-of]]))
and i do an info op for coll-of, it works as expected:
send: {"ns": "my-ns.spec", "symbol": "coll-of", "op": "info", ...}
receive: {"status": ["done"], "doc": "Returns a spec..."}
however, when i don't refer coll-of directly, the info op fails for s/coll-of:
(ns my-ns.spec
    [clojure.spec.alpha :as s :include-macros true]))

send: {"ns": "my-ns.spec", "symbol": "s/coll-of", "op": "info", ...}
receive: {"status": ["done", "no-info"], ...}
the problem only seems to happen for macros; it works fine for e.g. s/explain. i'm also able to eval code with s/coll-of with no problem. it just seems to be a problem with the info op. am i doing something wrong?