sourcegraph / openctx

See contextual info about code from your dev tools, in your editor, code review, and anywhere else you read code.
https://openctx.org
Apache License 2.0
149 stars 17 forks source link

vscode-lib: expose vscode API via global #161

Closed keegancsmith closed 4 months ago

keegancsmith commented 4 months ago

Currently vscode doesn't support dynamic imports, so it isn't possible for a javascript provider to opt-in to more advanced user experience via the vscode APIs.

Until we can more easily opt-in to vscode support, we expose the vscode API via node's global object. We want to see what sort of APIs get used from vscode in providers, and will then likely evolve a first class editor abstraction.

keegancsmith commented 4 months ago

@sqs I will rely on post-merge review. If this looks ugly to ya or if you think we should maybe hide the interactions with global behind another package happy to implement that.