Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export ExtensionRuntime (or LanguageClient) for other extensions #483

Merged
merged 1 commit into from
Jul 15, 2024

Conversation

BurstingF
Copy link
Contributor

@BurstingF BurstingF commented Jul 9, 2024

This change would export the ExtensionRuntime object that is created such that other extensions can access it.
This would, for example, allow other extensions to depend on this extension and use the LanguageClient it creates to send requests without the need to start their own LanguageClient.

With the current changes other extensions could access the LanguageClient like this:

const client: LanguageClient = vscode.extensions.getExtension('dafny-lang.ide-vscode')?.exports.client;
client.sendRequest(...)

Note: Perhaps if exporting ExtensionRuntime is a bit too broad, only the LanguageClient could be exported instead.

@keyboardDrummer keyboardDrummer enabled auto-merge (squash) July 15, 2024 10:00
@keyboardDrummer keyboardDrummer merged commit bb86c95 into dafny-lang:master Jul 15, 2024
2 checks passed
@keyboardDrummer
Copy link
Member

Seems good, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants