Fork me on GitHub
#chlorine-clover
<
2021-12-14
>
seancorfield01:12:52

@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?

seancorfield01:12:45

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

mauricio.szabo01:12:48

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

seancorfield01:12:44

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

seancorfield01:12:57

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.szabo02:12:05

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

mauricio.szabo02:12:58

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.szabo02:12:54

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

seancorfield02:12:09

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

seancorfield02:12:33

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

mauricio.szabo02:12:10

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.szabo02:12:07

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

1
borkdude08:12:17

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

borkdude08:12:36

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