Fork me on GitHub
#chlorine-clover
<
2021-09-26
>
mauricio.szabo00:09:25

I don't think there's a way to make code from an extension be visible to the other... Vscode is quite opinionated on how plug-ins should behave

👍 1
mauricio.szabo00:09:16

What exactly do you want to get from Clover? Also, will you make you extension in JS, typescript, ClojureScript?

djblue04:09:55

I was hoping to leverage the repl connection that the user already setup to evaluate clj/s forms. I'm doing it in https://github.com/djblue/portal/blob/master/src/portal/extensions/vs_code.cljs.

pez07:09:08

Extensions can expose APIs to each other. Clover and Calva could have functions exposed that lets the Portal extension evaluate stuff using their REPLs. The Portal extension can check if either Clover’s or Calva’s API is available before using. Not sure I'm answering the question, but anyway. 😀

djblue15:09:57

That's exactly what I'm thinking :thumbsup:

pez16:09:06

Can you describe what how you see the user interacting here?

djblue17:09:27

Here is the sequence of events I was thinking would happen: • The user would have either clover or calva installed • They would then install the portal extension which installs a few commands such as an open command • They would establish a repl connection through clover or calva • They would run the portal open command which would leverage a repl connection to eval some setup code and get back a port number • The portal extension would then open the UI in a webview with the given port

djblue17:09:08

The alternative would be to do this coordination manually, but I was hoping to leverage the infrastructure of existing plugins

pez19:09:25

Makes sense.

mauricio.szabo13:09:10

Well, I may have to look on how to expose an API to eval arbitrary commands, them. I though that if you needed something more complex, the code that power Clover is completely separate from the VSCode extension so you can use it in you ClojureScript code if you want, but to reuse the REPL connection you'll have to somehow hook up something