Skip to content

Allow direct cljs nREPL connections #420

@chr15m

Description

@chr15m

First, thank you so much for Fireplace and your years of work on Vim plugins! 🙏

There are now runtime environments that are pure ClojureScript running on e.g. Node and they have no Clojure/JVM or Piggieback in sight. For example nbb is cljs on Node and provides a basic nREPL (there are others). Some other nREPL clients are able to connect to and use this as documented in that link. Not all features are supported but you can at least send code and have it run.

To stand up an nbb nREPL:

mkdir nbb-nrepl-test; cd nbb-nrepl-test
echo {} > package.json
npm i nbb
npx nbb nrepl-server :port 1337

In Fireplace after running gvim test.cljs I can connect to this with :Connect 127.0.0.1:1337 and I can do :CljEval and it works, as I guess Fireplace assumes it's a regular Clojure nREPL. However when I do cqq on a form I get:

Fireplace: no default ClojureScript REPL

Is there a way for me to tell Fireplace that the current REPL connection it has open is already a ClojureScript REPL? If not, any tips or pointers for adding thise so I can raise a PR are much appreciated! Many thanks!

Updated to add: here is a thread where they work out the same issue in CIDER on Emacs: clojure-emacs/cider#3061

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions