mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Added a warning if conflicting rust-lang.rust is enabled.
This commit is contained in:
parent
150ea3a61f
commit
1152e27520
1 changed files with 11 additions and 0 deletions
|
@ -132,6 +132,7 @@ async function tryActivate(context: vscode.ExtensionContext) {
|
||||||
ctx.pushCleanup(activateTaskProvider(workspaceFolder, ctx.config));
|
ctx.pushCleanup(activateTaskProvider(workspaceFolder, ctx.config));
|
||||||
|
|
||||||
activateInlayHints(ctx);
|
activateInlayHints(ctx);
|
||||||
|
warnAboutRustLangExtensionConflict();
|
||||||
|
|
||||||
vscode.workspace.onDidChangeConfiguration(
|
vscode.workspace.onDidChangeConfiguration(
|
||||||
_ => ctx?.client?.sendNotification('workspace/didChangeConfiguration', { settings: "" }),
|
_ => ctx?.client?.sendNotification('workspace/didChangeConfiguration', { settings: "" }),
|
||||||
|
@ -399,3 +400,13 @@ async function queryForGithubToken(state: PersistentState): Promise<void> {
|
||||||
await state.updateGithubToken(newToken);
|
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…
Add table
Add a link
Reference in a new issue