aboutsummaryrefslogtreecommitdiff
path: root/editors/code/src/ctx.ts
diff options
context:
space:
mode:
authorGregoire Geis <[email protected]>2020-02-03 19:24:50 +0000
committerGregoire Geis <[email protected]>2020-02-03 19:24:50 +0000
commitb70ad7e5f3d524204fab88fe2a8c5a6fbef9e88e (patch)
treed01119552b4963f58834f4f8af14b674cbd9773c /editors/code/src/ctx.ts
parent58c007674b8c746beab371ca13fce951af6cd1f2 (diff)
Remove enableEnhancedTyping and type overriding infrastructure.
Diffstat (limited to 'editors/code/src/ctx.ts')
-rw-r--r--editors/code/src/ctx.ts24
1 files changed, 0 insertions, 24 deletions
diff --git a/editors/code/src/ctx.ts b/editors/code/src/ctx.ts
index 05d21ae56..aa75943bf 100644
--- a/editors/code/src/ctx.ts
+++ b/editors/code/src/ctx.ts
@@ -50,30 +50,6 @@ export class Ctx {
50 this.pushCleanup(d); 50 this.pushCleanup(d);
51 } 51 }
52 52
53 overrideCommand(name: string, factory: (ctx: Ctx) => Cmd) {
54 const defaultCmd = `default:${name}`;
55 const override = factory(this);
56 const original = (...args: unknown[]) =>
57 vscode.commands.executeCommand(defaultCmd, ...args);
58 try {
59 const d = vscode.commands.registerCommand(
60 name,
61 async (...args: unknown[]) => {
62 if (!(await override(...args))) {
63 return await original(...args);
64 }
65 },
66 );
67 this.pushCleanup(d);
68 } catch (_) {
69 vscode.window.showWarningMessage(
70 'Enhanced typing feature is disabled because of incompatibility ' +
71 'with VIM extension, consider turning off rust-analyzer.enableEnhancedTyping: ' +
72 'https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/user/README.md#settings',
73 );
74 }
75 }
76
77 get subscriptions(): Disposable[] { 53 get subscriptions(): Disposable[] {
78 return this.extCtx.subscriptions; 54 return this.extCtx.subscriptions;
79 } 55 }