aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-12-18 17:48:41 +0000
committerGitHub <[email protected]>2020-12-18 17:48:41 +0000
commit53f81e4e8c8307069d89cee58cb12142350b09c2 (patch)
treed720c1bf65987dbf000bf96a35eb8a962a42f6fb /editors
parent150ea3a61f07b19db3f55e8c675eba53f1a22961 (diff)
parent689ebb98be043182a694c40e963842fb913fe33e (diff)
Merge #6932
6932: Added a warning if conflicting rust-lang.rust is enabled. r=lnicola a=extremegf Added a warning if conflicting rust-lang.rust plugin is enabled. Resolves #6463 ![Screenshot from 2020-12-18 18-33-02](https://user-images.githubusercontent.com/1788593/102644202-b2f50500-4160-11eb-8fb0-76aeebd80aea.png) Co-authored-by: Przemyslaw Horban <[email protected]>
Diffstat (limited to 'editors')
-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..191960960 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}