fix: Fix project linking popup appearing for modules that can be linked to a crate

This commit is contained in:
Lukas Wirth 2023-04-09 10:02:30 +02:00
parent d73161b491
commit 98a673c4a8
2 changed files with 24 additions and 6 deletions

View file

@ -125,7 +125,11 @@ export async function createClient(
typeof diag.code === "string" || typeof diag.code === "number"
? diag.code
: diag.code?.value;
if (value === "unlinked-file" && !unlinkedFiles.includes(uri)) {
if (
value === "unlinked-file" &&
!unlinkedFiles.includes(uri) &&
diag.message !== "file not included in module tree"
) {
const config = vscode.workspace.getConfiguration("rust-analyzer");
if (config.get("showUnlinkedFileNotification")) {
unlinkedFiles.push(uri);