diff options
author | Philipp Mildenberger | 2023-03-18 19:12:20 +0000 |
---|---|---|
committer | Philipp Mildenberger | 2023-05-18 19:48:32 +0000 |
commit | 76b5cab52479daf25ffa0af798c1ebcf6a4f0004 (patch) | |
tree | af2dc03114a05cb458518006ef16c3a74a28b097 /helix-term/src/ui/mod.rs | |
parent | 0637691eb1fb7e2055fc04a0209be94906c2bd1a (diff) |
Refactored doc.language_servers and doc.language_servers_with_feature to return an iterator and refactor LanguageServerFeature handling to a HashMap (language server name maps to features)
Co-authored-by: Pascal Kuthe <pascal.kuthe@semimod.de>
Diffstat (limited to 'helix-term/src/ui/mod.rs')
-rw-r--r-- | helix-term/src/ui/mod.rs | 8 |
1 files changed, 3 insertions, 5 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![]; } |