简体   繁体   中英

How to set up atom editor for clojurescript development with figwheel?

It looks like the atom editor has a reasonable degree of clojure and clojurescript support through various packages. Does anyone have a recommended way to configure it to use figwheel? Clearly this is possible using a separate terminal, but I'm interested in whether a more integrated in-edit REPL is possible. One where the REPL executes code in the browser app.

I'm looking for some help akin to that provided at https://github.com/bhauman/lein-figwheel/wiki/Running-figwheel-in-a-Cursive-Clojure-REPL for the intellij/cursive ide.

Update: After reading Using the Figwheel REPL within NRepl , and realising that the 'Start REPL' command provided by the atom package proto-repl probably ran lein repl , I updated my project accordingly - see gist .

Start REPL produced some promising output see gist , and the application started correctly in the browser.

Almost there! This works, but so far I have not found a way to free up port 3449 again. Not even closing down the editor and restarting does that.

Here's the issue

user=> nil
(stop-figwheel!)
user=> nil
(start-figwheel!)
Figwheel: Starting server at http://127.0.0.1:3450
Port 3450 is already being used. 
Are you running another Figwheel instance? 
If you want to run two Figwheel instances add a new :server-port (i.e.:server-port 3450)
to Figwheel's config options in your project.clj

proto-repl repo的问题54中正在讨论这个问题,但目前还没有解决方案。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM