Skip to content

Commit 1152e27

Browse files
author
Przemyslaw Horban
committed
Added a warning if conflicting rust-lang.rust is enabled.
1 parent 150ea3a commit 1152e27

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

editors/code/src/main.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ async function tryActivate(context: vscode.ExtensionContext) {
132132
ctx.pushCleanup(activateTaskProvider(workspaceFolder, ctx.config));
133133

134134
activateInlayHints(ctx);
135+
warnAboutRustLangExtensionConflict();
135136

136137
vscode.workspace.onDidChangeConfiguration(
137138
_ => ctx?.client?.sendNotification('workspace/didChangeConfiguration', { settings: "" }),
@@ -399,3 +400,13 @@ async function queryForGithubToken(state: PersistentState): Promise<void> {
399400
await state.updateGithubToken(newToken);
400401
}
401402
}
403+
404+
function 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+
}

0 commit comments

Comments
 (0)