From 39179c49c657adcc7178d5218edc19f725fc0c42 Mon Sep 17 00:00:00 2001 From: Wilfred Hughes Date: Wed, 12 Jun 2024 17:31:39 -0700 Subject: fix: Improve hover text in unlinked file diagnostics Use full sentences, and mention how to disable the diagnostic if users are intentionally working on unowned files. --- src/tools/rust-analyzer/editors/code/src/client.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/tools/rust-analyzer/editors/code') diff --git a/src/tools/rust-analyzer/editors/code/src/client.ts b/src/tools/rust-analyzer/editors/code/src/client.ts index 1c2a34b484d..542233e7b91 100644 --- a/src/tools/rust-analyzer/editors/code/src/client.ts +++ b/src/tools/rust-analyzer/editors/code/src/client.ts @@ -76,7 +76,8 @@ export async function createClient( // value === "unlinked-file" && value === "temporary-disabled" && !unlinkedFiles.includes(uri) && - diag.message !== "file not included in module tree" + (diag.message === "file not included in crate hierarchy" || + diag.message.startsWith("This file is not included in any crates")) ) { const config = vscode.workspace.getConfiguration("rust-analyzer"); if (config.get("showUnlinkedFileNotification")) { -- cgit 1.4.1-3-g733a5