about summary refs log tree commit diff
path: root/editors/code
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2023-04-09 10:02:30 +0200
committerLukas Wirth <lukastw97@gmail.com>2023-04-09 10:17:58 +0200
commit98a673c4a89726324e0ef7238181bb85e49ea3e5 (patch)
tree0eb62e6d18195a2e82da1185172a159392a0ba88 /editors/code
parentd73161b491ec670413c847639d3c5aa58a6a89b4 (diff)
downloadrust-98a673c4a89726324e0ef7238181bb85e49ea3e5.tar.gz
rust-98a673c4a89726324e0ef7238181bb85e49ea3e5.zip
fix: Fix project linking popup appearing for modules that can be linked to a crate
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/src/client.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/editors/code/src/client.ts b/editors/code/src/client.ts
index e76710cb247..b27d9f54943 100644
--- a/editors/code/src/client.ts
+++ b/editors/code/src/client.ts
@@ -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);