diff --git a/docs/develop-logseq.md b/docs/develop-logseq.md index 7e8c96b530..5138591b4e 100644 --- a/docs/develop-logseq.md +++ b/docs/develop-logseq.md @@ -48,8 +48,24 @@ you may run `(shadow.user/worker-repl)`, or use `(shadow/nrepl-select :app {:ru > [!TIP] > you can find the `` in http://localhost:9630/runtimes -##### VSCode -;; TODO +##### Intellij Idea/Cursive-ide +The setup is almost same as Calva except it requires switching REPL from CLJ to CLJS manually. + +1. Start nrepl with ```yarn watch```, wait until it prints ``shadow-cljs - nREPL server started on port 8701`` +2. Create a new remote REPL run configuration: + - Connection type: nREPL + - Context module: logseq + - :radio_button: Use port from file with localhost + - :radio_button: Use standard port file +3. Start the remote REPL, now you are in CLJ REPL instead of target CLJS REPL +4. In the REPL, execute ```(shadow.cljs.devtools.api/repl :app)``` +5. Verify you are in CLJS REPL by executing ```(js/alert "hello world")```, it should show an alert dialog in the browser window + +> [!WARNING] +> You need open the browser dev app (http://localhost:3001) before executing step 5, otherwise it will throw an error: +> +> ```No available JS runtime. See https://shadow-cljs.github.io/docs/UsersGuide.html#repl-troubleshooting=> nil``` + ### Production Build @@ -86,7 +102,7 @@ Alternatively, run `bb dev:electron-start` to do this step with one command. To download bb, see https://github.com/babashka/babashka#installation. 3. (Optional) Update dependencies if `resources/package.json` has changed since -the last time you used dev Logseq. + the last time you used dev Logseq. ```bash # pull new changes