Bail if no language servers support workspace symbols (#7286)

pull/16/head
Michael Davis 2 years ago committed by GitHub
parent 31b8b728a2
commit d4427125eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -442,6 +442,15 @@ pub fn symbol_picker(cx: &mut Context) {
pub fn workspace_symbol_picker(cx: &mut Context) { pub fn workspace_symbol_picker(cx: &mut Context) {
let doc = doc!(cx.editor); 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 get_symbols = move |pattern: String, editor: &mut Editor| {
let doc = doc!(editor); let doc = doc!(editor);

Loading…
Cancel
Save