I think there's an opportunity to build editor agnostic refactoring/cider-nrepl plugins for clojurescript - I've been doing some stuff with neovim's node integration.
well both cider-nrepl and refactor-nrepl are editor agnostic. and they both have some cljs support
in fact cider-nrepl is used in vim fireplace, lighttable, and counterclockwise afaik
right, I mean that a clojurescript client library to the middleware that can be used in atom/light table/neovim should be possible - if our editor's plugins can give a refactoring library input text and handle the output text we'll be way ahead
Hey, possibly dumb question - does anyone know if there's a way in the Cursive repl to have it send the command I'm typing in even if the cursor isn't at the end of a line / s-expression?
@snoe I see what you mean. not sure how editor specific this client code needs to be tho
I’ve created #C0F4MB8AY where I intend to hang out while writing https://github.com/maitria/avi (avi is a vi written in Clojure).
@timgilbert: Can you give me an example of what you mean? i.e. an expression and where the caret would be?
@cfleming: So I've just typed (+ 1 2)
in the browser. My cursor is now between 2
and )
I want to just hit enter and have the form evaluated
@timgilbert: So you’re in the REPL editor, or the main editor?
But right now it inserts a newline between 2
and )
In the little one-line REPL window
CMD-enter will send it immediately
I know I can hit ctrl-enter to evaluate the line
Er, yeah
Or Ctrl-enter… right
I'd just like an option so I don't have to either hold a modifier key or get my cursor to EOL before I can get results
The thing is, that’s not actually a little one-line REPL window, you can drag it up to a multi-line editor
Which people (me included) use all the time.
Yeah, I guess I just would like something that behaves a little more like a command-line repl. If I want a multi-line thing I'm more inclined to use the actual editor and send forms over that way
(I totally ge that this is a personal preference thing, BTW, I don't think my way is necessarily more correct)
You can actually re-bind the action, but I’m not sure if you can re-bind it to just Enter. Go to Settings->Keymap, and search for Execute Current Statement
You’ll see that’s bound to Ctrl-Enter if you’re on Win/Linux, you could try binding it to just Enter
I’m not sure if that’s allowed, though.
That command only affects the REPL editor, it won’t affect anything else.
I'm on os/x, but I'll give that a go
Ok, it’ll be bound to Cmd-Enter then.
BTW there’s a #C0744GXCJ channel here as well as #C050AN6QW
Oh, didn't see that, thanks
No worries, here is fine too
Hmm, well I was able to re-bind enter to that command and it seems to work fine, despite giving me some mildly scary warnings - thanks @cfleming!
Mildly scary warnings?
About re-binding enter, was a little nervous that I'd need to figure out all the things it used to be bound to and re-bind them
...but I didn't, phew
No, in general you don’t have to worry about conflicts. Cursive will ensure that the Clojure-specific actions take precedence in Clojure contexts
Awesome. Thanks for the help!
No worries!