Fix analyzer extension fail when there are enabled any VIM extension.
@@ -23,6 +23,7 @@ export function activate(context: vscode.ExtensionContext) {
const original = (...args: any[]) =>
vscode.commands.executeCommand(defaultCmd, ...args);
+ try {
registerCommand(name, async (...args: any[]) => {
const editor = vscode.window.activeTextEditor;
if (
@@ -36,6 +37,9 @@ export function activate(context: vscode.ExtensionContext) {
return await original(...args);
}
});
+ } catch(_) {
+ vscode.window.showWarningMessage('Enhanced typing feature is disabled because of incompatibility with VIM extension');
+ }
}
// Commands are requests from vscode to the language server
