From 2b9cc20d236f88bf0dd6aeae1ff3215e561b2c49 Mon Sep 17 00:00:00 2001 From: Nick Pupko Date: Fri, 15 Aug 2025 16:33:57 +0300 Subject: [PATCH] Improve error messages for goto LSP commands (#14171) --- helix-term/src/commands/lsp.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs index a85aef7f..929774c7 100644 --- a/helix-term/src/commands/lsp.rs +++ b/helix-term/src/commands/lsp.rs @@ -935,7 +935,13 @@ where } let call = move |editor: &mut Editor, compositor: &mut Compositor| { if locations.is_empty() { - editor.set_error("No definition found."); + editor.set_error(match feature { + LanguageServerFeature::GotoDeclaration => "No declaration found.", + LanguageServerFeature::GotoDefinition => "No definition found.", + LanguageServerFeature::GotoTypeDefinition => "No type definition found.", + LanguageServerFeature::GotoImplementation => "No implementation found.", + _ => "No location found.", + }); } else { goto_impl(editor, compositor, locations); } -- 2.51.2