Fork me on GitHub
#calva
<
2019-04-29
>
idas17:04:56

hi! i’m giving vscode and calva a spin, and i was wondering as a long time vim user, how to customize a few of the calva-paredit keyboard bindings to be similar to vim-sexp (https://github.com/guns/vim-sexp) / vim-sexp-mappings-for-regular-people (https://github.com/tpope/vim-sexp-mappings-for-regular-people)?

pez17:04:01

Welcome, @idas ! Are you using the vim extension?

idas17:04:44

hi @pez! I’m using the vscodevim extension (https://github.com/VSCodeVim/Vim) as it seemed popular

idas17:04:40

and also adjusted the calva setup based on reading this: https://github.com/BetterThanTomorrow/calva/wiki/Using-with-VIM-extension

idas17:04:40

if there’s an alternative vim extension i should be using, i’ll adjust accordingly

pez17:04:48

I think that is the right extension. 😎

👍 1
seancorfield18:04:11

@pez Just saw Atlassian's announcement of their new VS Code extension that brings JIRA and BitBucket directly into the editor and it made me think about trying VS Code and Calva again... I'm on Atom/Chlorine, which I use because it works with a bare Socket REPL and requires no dev dependencies (although it works better with Compliment added). Looks like Calva requires CIDER/nREPL as deps on the server side (for Clojure) since you're still relying on the user starting the REPL?

seancorfield18:04:43

Do you think Calva would ever support bare Socket REPLs / prepl or is it always going to require CIDER/nREPL?

pez18:04:37

@seancorfield: there is no decision about not supporting bare Socket, rather a matter of bandwidth. But, yeah, there’s nothing planned either. However, we (well, right now it is just I who have the time) are working with making Calva inject the dependencies it needs (aka jack-in) so as long as you are not on self hosted ClojureScript I think you should be able to use Calva anyway. I posted a preview build of Calva 2, with jack-in, yesterday. Scroll up, if you like to try that. I included some info on the most ugly warts in the upload.

pez18:04:26

If you are using Figwheel Main, let me know and I can post a build which supports that better.

seancorfield18:04:42

I'm pure server-side Clojure. CLI / deps.edn. Bare Socket REPL.

pez18:04:49

@idas: afaik, the key binding mechanism of vscodevim is pretty awesome so you should be able to do the remapping. No clue on how you do it though, but if you do it, please update that wiki page with your findings and any json stuff you produce. 😍

idas18:04:24

gotcha! thanks for the info!

metal 1
seancorfield18:04:34

My workflow today is to start Cognitect's REBL with my project's dependencies and a JVM option to start a Socket REPL, then connect Atom/Chlorine to that. But I do also connect Atom/Chlorine to live, running processes via a Socket REPL too.

pez18:04:38

Can you share the command lines involved?

seancorfield18:04:45

We do not have nREPL anywhere as a dependency. Chlorine uses unrepl to inject some code over the wire (to start the secondary "control" Socket REPL). I use Compliment only when I need it.

pez18:04:24

I’m not familiar with Compliment, what role does that play?

seancorfield18:04:40

Code-completion suggestions.

dominicm18:04:45

There will soon be nrepl over socket repl, solving the problem

seancorfield18:04:07

@dominicm Introducing nREPL is not a "solution" as far as I'm concerned 🙂

pez18:04:37

@dominicm, that is good news.

seancorfield18:04:38

I do not want something injecting nREPL etc into live, running processes.

pez18:04:40

Calva can’t inject stuff into a running process yet, anyway, it can only start things with the dependencies it needs injected.

seancorfield18:04:10

My ideal tooling wouldn't even inject the unrepl blob, to be honest. It would do everything via Socket REPL and prepl, with no additional dependencies required.

pez18:04:48

Any particular reason why that is important?

seancorfield18:04:55

Anyways, I didn't really want to stir anything up -- I was mostly dropping by to see what plans, if any, Calva had for bare Socket REPL support.

seancorfield19:04:48

I don't want an editor/tooling to inject things into live, running processes -- especially production processes.

pez19:04:51

No plans, unfortunately. But hopefully someone will show up with the time and passion for it. I’d love to be able to support self hosted cljs.

pez19:04:02

What would be the problem with “nrepl over bare socket” that is not there with “editor over bare socket”?

seancorfield19:04:03

What would nREPL inject over the socket, to make that happen? @dominicm?

seancorfield19:04:47

And would it then make the Socket REPL unusable or will it spawn a new Socket REPL to communicate with?

dominicm19:04:26

It will upgrade the connection. As far as I'm aware it should not introduce instability for other socket repls.

dominicm19:04:45

The work is being done to mirror the approach used by unrepl.

seancorfield19:04:32

Is there a repo/branch I can take a look at to see exactly how that is going to work?

seancorfield19:04:02

(I'm inherently very, very suspicious of nREPL and CIDER after past experiences)

dominicm19:04:08

Sorry, that should have said *mirror the approach used by unrepl.

dominicm19:04:26

I believe any work would be in PRs by cgrand.

seancorfield19:04:37

I see an injection branch in nrepl's repo with commits by Christophe... I'll keep an eye on it...

seancorfield19:04:49

I'll also continue to keep an eye on this channel via the mirror into Zulip so I can keep track of Calva's development. I recommend Calva to anyone I see talking about VS Code 🙂

pez19:04:51

I have seen you recommend Calva, @seancorfield, ❤️ Hopefully we will be able to make VS Code a choice with not too many tradeoffs for Clojurists,