chlorine-clover

mauricio.szabo 2021-09-26T00:26:25.032800Z

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.szabo 2021-09-26T00:27:16.034500Z

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

djblue 2021-09-26T04:18:55.034800Z

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.

pez 2021-09-26T07:32:08.039800Z

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. 😀

mauricio.szabo 2021-09-27T13:28:10.042500Z

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

djblue 2021-09-26T15:19:57.039900Z

That's exactly what I'm thinking 👍

pez 2021-09-26T16:39:06.041200Z

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

djblue 2021-09-26T17:26:27.041400Z

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

djblue 2021-09-26T17:41:08.042100Z

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

pez 2021-09-26T19:24:25.042300Z

Makes sense.