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 Schuyler Mortimer committed Jul 10, 2024
1 parent 958885c commit 87121d5
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 @@ -438,6 +438,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 87121d5

Please sign in to comment.