summaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/mod.rs8
-rw-r--r--helix-term/src/ui/statusline.rs5
2 files changed, 5 insertions, 8 deletions
diff --git a/helix-term/src/ui/mod.rs b/helix-term/src/ui/mod.rs
index 118836c0..6f7ed174 100644
--- a/helix-term/src/ui/mod.rs
+++ b/helix-term/src/ui/mod.rs
@@ -394,13 +394,11 @@ pub mod completers {
pub fn lsp_workspace_command(editor: &Editor, input: &str) -> Vec<Completion> {
let matcher = Matcher::default();
- let language_servers =
- doc!(editor).language_servers_with_feature(LanguageServerFeature::WorkspaceCommand);
- let options = match language_servers
- .into_iter()
+ let options = match doc!(editor)
+ .language_servers_with_feature(LanguageServerFeature::WorkspaceCommand)
.find_map(|ls| ls.capabilities().execute_command_provider.as_ref())
{
- Some(id_options) => id_options,
+ Some(options) => options,
None => {
return vec![];
}
diff --git a/helix-term/src/ui/statusline.rs b/helix-term/src/ui/statusline.rs
index 60997956..4aa64634 100644
--- a/helix-term/src/ui/statusline.rs
+++ b/helix-term/src/ui/statusline.rs
@@ -202,11 +202,10 @@ fn render_lsp_spinner<F>(context: &mut RenderContext, write: F)
where
F: Fn(&mut RenderContext, String, Option<Style>) + Copy,
{
- let language_servers = context.doc.language_servers();
+ let language_server = context.doc.language_servers().next();
write(
context,
- language_servers
- .first()
+ language_server
.and_then(|srv| {
context
.spinners