Skip to content

Commit

Permalink
Bail if no language servers support workspace symbols (#7286)
Browse files Browse the repository at this point in the history
  • Loading branch information
the-mikedavis authored Jun 8, 2023
1 parent 31b8b72 commit d442712
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 d442712

Please sign in to comment.