mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Remove enableEnhancedTyping and type overriding infrastructure.
This commit is contained in:
parent
58c007674b
commit
b70ad7e5f3
4 changed files with 1 additions and 41 deletions
|
@ -50,30 +50,6 @@ export class Ctx {
|
|||
this.pushCleanup(d);
|
||||
}
|
||||
|
||||
overrideCommand(name: string, factory: (ctx: Ctx) => Cmd) {
|
||||
const defaultCmd = `default:${name}`;
|
||||
const override = factory(this);
|
||||
const original = (...args: unknown[]) =>
|
||||
vscode.commands.executeCommand(defaultCmd, ...args);
|
||||
try {
|
||||
const d = vscode.commands.registerCommand(
|
||||
name,
|
||||
async (...args: unknown[]) => {
|
||||
if (!(await override(...args))) {
|
||||
return await original(...args);
|
||||
}
|
||||
},
|
||||
);
|
||||
this.pushCleanup(d);
|
||||
} catch (_) {
|
||||
vscode.window.showWarningMessage(
|
||||
'Enhanced typing feature is disabled because of incompatibility ' +
|
||||
'with VIM extension, consider turning off rust-analyzer.enableEnhancedTyping: ' +
|
||||
'https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/README.md#settings',
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
get subscriptions(): Disposable[] {
|
||||
return this.extCtx.subscriptions;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue