Fork me on GitHub
#cider
<
2020-05-20
>
admin05508:05:32

@jr0cket > If you have more than one project configuration file (project.clj, deps.edn, build.boot) then cider-jack-in commands should display a prompt allowing you to choose which configuration to use. Yes it's what I already do, when I jack-in I choose clojure-cli and it works perfectly. However as I say above, when I use the command cljr-add-project-dependency`` , clj-refactor see the project.clj file and try to add the dependency in there. I anayse the code and I think it's because the order of filenames in this list: https://github.com/clojure-emacs/clj-refactor.el/blob/8259791e054382457b87d1f78061b5e3ce948907/clj-refactor.el#L818 In the clj-refactor code I don't see any variable to force the project file which I can overwrite in .dirs-locals.el for eg. I will try to implement that and do an PR. BTW, thank for the useful information that we can find on your website too, it help me a lot, particully for the -A:fig a while ago when I first tested figwheel-main. 😉

tomd15:05:33

hello 👋 when I cause stack traces by eval-ing in the repl, I get a *cider-error* buffer which is great. but when a stacktrace appears in the repl otherwise (i.e. not from me eval-ing in emacs) the *cider-error* buffer seems unaware of it, and I can't find a way to get it to inspect it. am I missing something, or is this not possible in cider? thanks

drewverlee16:05:29

Does cider help see what methods are available on a java class? Or should i be looking elsewhere?

bozhidar08:05:33

I guess we can also add some command to just show all the

dpsutton16:05:40

there's javadoc

dpsutton16:05:13

and if you're on a version greater than 11 check the comments on https://github.com/clojure-emacs/orchard/pull/84 to load up the recent changes to make it work

papachan16:05:18

Hello just a small question regarding shadow-cljs and cider

papachan16:05:48

Is there a way to  automatically start my app and directly tell `cider-connect-sibling-cljs` to use my unique `:app` alias  ? I have my `dir-locals.el` on this project with the basic settings:

((nil . ((cider-default-cljs-repl . shadow)
         (cider-shadow-cljs-default-options . "app"))))

papachan16:05:42

but when i launch cider-jack-in-clj&cljs emacs ask me always for app .

dpsutton17:05:29

i don't think jack-in-clj&cljs works well with shadow

dpsutton17:05:53

i believe when it does it together it uses the same startup program but that's not helpful here since presumably you want lein/clj on the backend and shadow on the frontend

dpsutton17:05:13

i'm surprised that works to be honest

papachan17:05:32

ah. i never had problem to launch shadow-cljs through jack-in-clj&cljs

papachan17:05:03

which launcher are you using? cider-jack-in-cljs ?

ericihli20:05:36

https://docs.cider.mx/cider/basics/clojurescript.html Haven't tested this, but would something like this work?

;; modify the list of known REPLs and set some default
((nil
  (cider-custom-cljs-repl-init-form . "(do (require '[shadow.cljs.devtools.api :as shadow]) (shadow/watch :app) (shadow/nrepl-select :app))"
  (cider-default-cljs-repl . custom)))

papachan01:05:46

Thank you i will try it.

papachan21:05:48

Seems i get it worked with another config

((nil . ((cider-preferred-build-tool . shadow-cljs)
	 (cider-default-cljs-repl . shadow)
	 (cider-shadow-default-options . ":app")
	 (cider-shadow-cljs-global-options . "-A:shadow-cljs"))))

drewverlee23:05:40

I just noticed cider inspect last value now upstates everytime i re eval. This is awesome!

jr0cket10:05:20

Yes, this is fantastic. I will need to update that in my Spacemacs book now. Thanks for the heads up