chlorine-clover

seancorfield 2021-12-14T01:54:52.030800Z

@mauricio.szabo Is it possible, in config.cljs to run a VS Code command somehow? I'd assume you don't have that bridged into sci right now, but is there some way your could hook such a thing into the cljs-available API?

seancorfield 2021-12-14T01:56:45.033Z

(specifically, I'm trying to figure out how to run the command simpleBrowser.open with a string argument -- a URL)

mauricio.szabo 2021-12-14T01:56:48.033100Z

I don't think so. Unless you can already run commands with the VSCode API, but I'm unsure if this API exists

seancorfield 2021-12-14T01:57:44.033400Z

vscode.commands.executeCommand('editor.action.addCommentLine'); seems to be a thing you can do...

seancorfield 2021-12-14T01:58:57.034300Z

Ah, not from the vscode "object" that seems to be available in the console (I'm not enough of a JS/TS expert to really understand how to get at such things).

mauricio.szabo 2021-12-14T02:00:05.035Z

On the console, at my version, vscode.commands return undefined. Let me upgrade real quick now

mauricio.szabo 2021-12-14T02:02:58.035900Z

Yeah, I need to hook up this API. But it should be simple - maybe I can hack something to make it available at VSCode and Atom. I'll look at this tomorrow 🙂

mauricio.szabo 2021-12-14T02:03:54.036900Z

(Provided that it works as we expect - which, considering VSCode, is asking too much, but we can hope 😄)

seancorfield 2021-12-14T02:07:09.037700Z

I assume there is some way in the JS console inside VS Code to actually get at that vscode module or the commands "object"?

seancorfield 2021-12-14T02:07:33.038200Z

But, yeah, if you could do something that works in both Atom and VS Code, that would be awesome 🙂

mauricio.szabo 2021-12-14T02:10:10.039500Z

Yeah, but I don't think the vscode module inside the console is the same as what the API offers. I tried once to read the VSCode source to get what they are doing, but it's a heavy code to read

mauricio.szabo 2021-12-14T02:11:07.040400Z

But yeah, I'll look at this tomorrow and see what it can be done 🙂

👍🏻 1
borkdude 2021-12-14T08:53:17.040900Z

FYI: you can configure SCI to allow all access to host interop.

borkdude 2021-12-14T08:53:36.041300Z

{:classes {'js goog/global :allow :all}}