diff options
author | Michael Davis | 2023-06-08 00:48:11 +0000 |
---|---|---|
committer | GitHub | 2023-06-08 00:48:11 +0000 |
commit | d4427125eb9f1f6936fae4c8569feb0893b76155 (patch) | |
tree | 6a60ce6beb37ca90036aa3e1eb3728ab391281f7 /helix-term/src/commands/lsp.rs | |
parent | 31b8b728a2ba5585a66da4f3dab279b08bd5600a (diff) |
Bail if no language servers support workspace symbols (#7286)
Diffstat (limited to 'helix-term/src/commands/lsp.rs')
-rw-r--r-- | helix-term/src/commands/lsp.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs index 3596df45..8c3fd13b 100644 --- a/helix-term/src/commands/lsp.rs +++ b/helix-term/src/commands/lsp.rs @@ -442,6 +442,15 @@ pub fn symbol_picker(cx: &mut Context) { pub fn workspace_symbol_picker(cx: &mut Context) { let doc = doc!(cx.editor); + if doc + .language_servers_with_feature(LanguageServerFeature::WorkspaceSymbols) + .count() + == 0 + { + cx.editor + .set_error("No configured language server supports workspace symbols"); + return; + } let get_symbols = move |pattern: String, editor: &mut Editor| { let doc = doc!(editor); |