Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClojureScript browser-connected REPL without Figwheel or shadow-cljs #1114

Closed
xavi opened this issue Apr 10, 2021 · 0 comments
Closed

ClojureScript browser-connected REPL without Figwheel or shadow-cljs #1114

xavi opened this issue Apr 10, 2021 · 0 comments
Labels
cljs ClojureScript-related connect jack-in

Comments

@xavi
Copy link

xavi commented Apr 10, 2021

I wanted to have in Calva a ClojureScript browser-connected REPL for the hello-world project of ClojureScript's "Quick Start" guide (https://clojurescript.org/guides/quick-start), without using Figwheel or shadow-cljs.

AS @PEZ told me in Clojurian's Slack #calva channel, this can be achieved by adding this custom connect sequence to .vscode/settings.json

{
    "calva.replConnectSequences": [
        {
            "projectType": "deps.edn",
            "name": "plain cljs browser repl",
            "cljsType": {
                "dependsOn": "User provided",
                "connectCode": "(do (require 'cljs.repl.browser) (cider.piggieback/cljs-repl (cljs.repl.browser/repl-env)))"
            }
        }
    ]
}

and then jacking in with this "plain cljs browser repl". As discussed in Slack this should probably be a built-in connect sequence, and that's why I'm opening this issue, as suggested.

OTOH, in the same Slack discussion, @PEZ also provided a connect sequence that I think solves this other issue about connecting to a Node.js REPL

{
    "calva.replConnectSequences": [
        {
            "projectType": "deps.edn",
            "name": "plain cljs node repl",
            "cljsType": {
                "dependsOn": "User provided",
                "connectCode": "(do (require 'cljs.repl.node) (cider.piggieback/cljs-repl (cljs.repl.node/repl-env)))"
            }
        }
    ]
}
@bpringe bpringe added connect cljs ClojureScript-related labels Apr 10, 2021
@PEZ PEZ added the jack-in label Apr 10, 2021
@PEZ PEZ mentioned this issue Apr 10, 2021
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cljs ClojureScript-related connect jack-in
Projects
None yet
Development

No branches or pull requests

3 participants