Skip to content

Commit

Permalink
Bail if no language servers support workspace symbols (helix-editor#7286
Browse files Browse the repository at this point in the history
)
  • Loading branch information
the-mikedavis authored and mtoohey31 committed Jun 2, 2024
1 parent 53e60f5 commit 0ce16b9
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions helix-term/src/commands/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0ce16b9

Please sign in to comment.