Added a warning if conflicting rust-lang.rust is enabled.

This commit is contained in:
Przemyslaw Horban 2020-12-18 18:39:51 +01:00
parent 150ea3a61f
commit 1152e27520

View file

@ -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<void> {
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")
};
}