diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs index 91bc0881fc8b2..9fd59506e2b34 100644 --- a/helix-term/src/application.rs +++ b/helix-term/src/application.rs @@ -746,6 +746,15 @@ impl Application { return; } }; + let path = match path.canonicalize() { + Ok(path) => path, + Err(err) => { + log::error!( + "Could not canonicalize diagnostic path {path:?}: {err}" + ); + return; + } + }; let offset_encoding = language_server!().offset_encoding(); let doc = self.editor.document_by_path_mut(&path).filter(|doc| { if let Some(version) = params.version {