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 <p.horban@invinets.com>
This commit is contained in:
commit
53f81e4e8c
@ -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");
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user