aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrzemyslaw Horban <[email protected]>2020-12-18 17:39:51 +0000
committerPrzemyslaw Horban <[email protected]>2020-12-18 17:39:51 +0000
commit1152e27520c9b7c2845d454903c0b72cda01afda (patch)
tree26d4fdfbfe5aa61d8c7707bb278bafa22da8fc74
parent150ea3a61f07b19db3f55e8c675eba53f1a22961 (diff)
Added a warning if conflicting rust-lang.rust is enabled.
-rw-r--r--editors/code/src/main.ts11
1 files changed, 11 insertions, 0 deletions
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) {
132 ctx.pushCleanup(activateTaskProvider(workspaceFolder, ctx.config)); 132 ctx.pushCleanup(activateTaskProvider(workspaceFolder, ctx.config));
133 133
134 activateInlayHints(ctx); 134 activateInlayHints(ctx);
135 warnAboutRustLangExtensionConflict();
135 136
136 vscode.workspace.onDidChangeConfiguration( 137 vscode.workspace.onDidChangeConfiguration(
137 _ => ctx?.client?.sendNotification('workspace/didChangeConfiguration', { settings: "" }), 138 _ => ctx?.client?.sendNotification('workspace/didChangeConfiguration', { settings: "" }),
@@ -399,3 +400,13 @@ async function queryForGithubToken(state: PersistentState): Promise<void> {
399 await state.updateGithubToken(newToken); 400 await state.updateGithubToken(newToken);
400 } 401 }
401} 402}
403
404function warnAboutRustLangExtensionConflict() {
405 const rustLangExt = vscode.extensions.getExtension("rust-lang.rust");
406 if (rustLangExt !== undefined) {
407 vscode.window .showWarningMessage(
408 "You have both rust-analyzer (matklad.rust-analyzer) and Rust (rust-lang.rust) " +
409 "plugins enabled. These are known to conflict and cause various functions of " +
410 "both plugins to not work correctly. You should disable one of them.", "Got it")
411 };
412}