Fork me on GitHub
#cider
<
2020-06-07
>
stardiviner02:06:56

I'm newbie using Luminus lein new luminus myshadow +cljs +shadow-cljs But I got problem to get a browser-repl code compltion like (js/alert ..) in Emacs CIDER. Does any one have a complete steps how to do this? This problem really troubled me a long time.

dpsutton02:06:58

You are wanting completion for things like js/document and js/alert?

dpsutton02:06:44

there's some experimental support for that but its quite fragile in my experience

dpsutton02:06:27

I've usually kept it turned off to be honest

stardiviner02:06:31

@dpsutton Usually how do you setup the CIDER connection to shadow-cljs? I'm now confused what's the simple and correct way, I check many differnet steps.

dpsutton02:06:09

i usually just do cider-jack-in-cljs

dpsutton02:06:24

and then choose the options. its probably better to start up shadow's server on the command line though

👍 1
dpsutton02:06:14

shadow-cljs -d cider/cider-nrepl:0.25.1 server and then cider-connect-cljs choose shadow-select. then (shadow/nrepl-watch :app) and then (shadow/nrepl-select :app)

stardiviner02:06:39

New method learned, Hope get luck.

dpsutton03:06:21

i don't know

dpsutton03:06:25

it seems to work for me

dpsutton03:06:45

you can just type in the port and it should work though

dpsutton03:06:51

that's just a convenience i believe

stardiviner03:06:38

I choose the 7002 port from command-line, then (shadow/watch :app) then (shadow/nrepl-select :app) . All works fine. But browser code completion still not available. Should I choose :browser-repl target instead?

dpsutton03:06:50

No. Are you talking about completion of cljs vars or things like js/alert?

stardiviner03:06:37

Both, I want to get both code completions.

stardiviner03:06:51

Or just only one of them can be archived?

stardiviner03:06:11

I tried the :browser-repl after cider-connect-cljs and shadow-cljs, At first time, it does not get code completion, Now it works fine now.

stardiviner03:06:34

dpsutton, thanks for your help. Really solved my big problem.