Fork me on GitHub
#cursive
<
2020-01-30
>
simongray10:01:04

I can’t for the life of me get Cursive to connect to the nrepl that shadow-cljs has created. Any help? This is a surprisingly hard problem to google despite the fact that the shadow-cljs dev apparently uses Cursive himself.

simongray10:01:39

You really are everywhere! Thanks, but this is exactly what I’m doing, but Cursive just hangs with Connecting to remote nREPL server...

thheller10:01:57

did you restart shadow-cljs? port changes require a restart

thheller10:01:05

it should print the port it used on startup

simongray10:01:59

Ok, for some reason it wasn’t but now it does seem to work. Now the issue is that the code I put in my starting CLJ namespace doesn’t seem to get run…?

simongray10:01:13

(ns dev
  (:require [shadow.cljs.devtools.api :as shadow]))

(shadow/watch :app)
(shadow/repl :app)

simongray10:01:34

I need to run it myself in the REPL I connect to in cursive

thheller10:01:23

this won't work

thheller10:01:40

nREPL doesn't allow it

thheller10:01:15

make it a (defn [] (shadow/watch ...) ...)) and call that manually once

thheller10:01:27

bind it to a keyboard shortcut in cursive

simongray10:01:30

I see. Thank you for the instant support!

simongray10:01:41

and thank you for making shadow-cljs

thheller10:01:58

and then use cursive repl -> remote -> localhost:that-port

thheller10:01:19

(and yes I do use Cursive) 🙂

thheller10:01:13

https://github.com/cursive-ide/cursive/issues/2216 should make that easier so Cursive can read the port shadow-cljs used without configured it

👍 4
Jakub Holý (HolyJak)15:01:36

Hello! Does Cursive understand shadow-cljs npm imports like

(ns mine
  (:require 
    ["@telia/styleguide" :as styleguide]
    ["@telia/styleguide/assets/allicons/AllIcons" :default AllIcons]))
(AllIcons)
? It currently complains that styleguide and AllIcons "cannot be resolved"

thheller15:01:47

it does not

😢 12
frankiesardo14:02:20

@U05224H0W do you use Cursive yourself? Is this something that makes using shadow-cljs cumbersome?

thheller14:02:49

I do use Cursive yes. I disabled that particular warning so it doesn't bother me.

👍 4
frankiesardo15:02:59

Thank you for your answer! Can you also share how do you disable that warning?

thheller16:02:50

I actually can't remember. I disabled several years ago. Somewhere in the options you can toggle which warnings to show or how to format them

frankiesardo17:02:17

Np, I'll keep digging 🙂

kenny18:01:14

The args for a function are misaligned.

cfleming22:01:29

Thanks, I’ll check that and see what’s going on.

4