mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
Refactor language client handling
This commit is contained in:
parent
40cbeb5b3d
commit
6f435977df
8 changed files with 456 additions and 437 deletions
|
@ -35,8 +35,10 @@ export class AstInspector implements vscode.HoverProvider, vscode.DefinitionProv
|
|||
});
|
||||
|
||||
constructor(ctx: Ctx) {
|
||||
ctx.pushCleanup(vscode.languages.registerHoverProvider({ scheme: "rust-analyzer" }, this));
|
||||
ctx.pushCleanup(vscode.languages.registerDefinitionProvider({ language: "rust" }, this));
|
||||
ctx.pushExtCleanup(
|
||||
vscode.languages.registerHoverProvider({ scheme: "rust-analyzer" }, this)
|
||||
);
|
||||
ctx.pushExtCleanup(vscode.languages.registerDefinitionProvider({ language: "rust" }, this));
|
||||
vscode.workspace.onDidCloseTextDocument(
|
||||
this.onDidCloseTextDocument,
|
||||
this,
|
||||
|
@ -53,7 +55,7 @@ export class AstInspector implements vscode.HoverProvider, vscode.DefinitionProv
|
|||
ctx.subscriptions
|
||||
);
|
||||
|
||||
ctx.pushCleanup(this);
|
||||
ctx.pushExtCleanup(this);
|
||||
}
|
||||
dispose() {
|
||||
this.setRustEditor(undefined);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue