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