vim-fireplace
vim-fireplace copied to clipboard
Jack in
Jobs make firing off lein repl :headless or a similar command in the background a much less dicey prospect than when Fireplace was introduced. Evaluate adding the option to start a REPL in the background.
https://github.com/clojure-vim/vim-jack-in might serve as inspiration
Feedback that I received on the initial vim-jack-in, people don't like it when closing their editor closes the REPL.
I would be willing to try to work on this—is there any particularly good launching point? Or should I just look for where the commands are run and wrap them in an "if jobs, do that, otherwise do the original synchronous thing"?
I need to reword that. Perhaps it would be simpler to simply write a ConnectBg or similar command that tries to launch the right repl in the background, and then runs FireplaceConnect as a callback.
I think a separate command is probably the way to go. Calling FireplaceConnect in a callback might not be necessary if .nrepl-port or similar is created.
Calling FireplaceConnect in a callback might not be necessary if .nrepl-port or similar is created.
Can I take this to mean that fireplace detects the creation of .nrepl-port and automatically connects? Or is it more like when a connection is needed, one is automatically created from .nrepl-port if it exists?
Another Q: does fireplace already have standard code for detecting lein vs. clojure-CLI (are there any others?), or would I need to write that/rip that from salve/classpath/etc.?
Calling FireplaceConnect in a callback might not be necessary if .nrepl-port or similar is created.
Can I take this to mean that fireplace detects the creation of
.nrepl-portand automatically connects? Or is it more like when a connection is needed, one is automatically created from.nrepl-portif it exists?
Automatically created on demand.
Another Q: does fireplace already have standard code for detecting lein vs. clojure-CLI (are there any others?), or would I need to write that/rip that from salve/classpath/etc.?
Nothing exists for this in Fireplace. In fact I am undecided on whether this feature should live inside of Fireplace or outside of it for that reason.