From 1152e27520c9b7c2845d454903c0b72cda01afda Mon Sep 17 00:00:00 2001
From: Przemyslaw Horban
Date: Fri, 18 Dec 2020 18:39:51 +0100
Subject: Added a warning if conflicting rust-lang.rust is enabled.
---
editors/code/src/main.ts | 11 +++++++++++
1 file changed, 11 insertions(+)
(limited to 'editors/code/src')
diff --git a/editors/code/src/main.ts b/editors/code/src/main.ts
index 2f3dde8ac..1c88b4613 100644
--- a/editors/code/src/main.ts
+++ b/editors/code/src/main.ts
@@ -132,6 +132,7 @@ async function tryActivate(context: vscode.ExtensionContext) {
ctx.pushCleanup(activateTaskProvider(workspaceFolder, ctx.config));
activateInlayHints(ctx);
+ warnAboutRustLangExtensionConflict();
vscode.workspace.onDidChangeConfiguration(
_ => ctx?.client?.sendNotification('workspace/didChangeConfiguration', { settings: "" }),
@@ -399,3 +400,13 @@ async function queryForGithubToken(state: PersistentState): Promise {
await state.updateGithubToken(newToken);
}
}
+
+function warnAboutRustLangExtensionConflict() {
+ const rustLangExt = vscode.extensions.getExtension("rust-lang.rust");
+ if (rustLangExt !== undefined) {
+ vscode.window .showWarningMessage(
+ "You have both rust-analyzer (matklad.rust-analyzer) and Rust (rust-lang.rust) " +
+ "plugins enabled. These are known to conflict and cause various functions of " +
+ "both plugins to not work correctly. You should disable one of them.", "Got it")
+ };
+}
--
cgit v1.2.3