mirror of
https://github.com/helix-editor/helix.git
synced 2025-04-04 19:37:54 +03:00
Respect lsp definition order for code actions (#9590)
This commit is contained in:
parent
cf99615b43
commit
07cb24abdd
3 changed files with 6 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
|||
use futures_util::{stream::FuturesUnordered, FutureExt};
|
||||
use futures_util::{stream::FuturesOrdered, FutureExt};
|
||||
use helix_lsp::{
|
||||
block_on,
|
||||
lsp::{
|
||||
|
@ -341,7 +341,7 @@ pub fn symbol_picker(cx: &mut Context) {
|
|||
|
||||
let mut seen_language_servers = HashSet::new();
|
||||
|
||||
let mut futures: FuturesUnordered<_> = doc
|
||||
let mut futures: FuturesOrdered<_> = doc
|
||||
.language_servers_with_feature(LanguageServerFeature::DocumentSymbols)
|
||||
.filter(|ls| seen_language_servers.insert(ls.id()))
|
||||
.map(|language_server| {
|
||||
|
@ -416,7 +416,7 @@ pub fn workspace_symbol_picker(cx: &mut Context) {
|
|||
let get_symbols = move |pattern: String, editor: &mut Editor| {
|
||||
let doc = doc!(editor);
|
||||
let mut seen_language_servers = HashSet::new();
|
||||
let mut futures: FuturesUnordered<_> = doc
|
||||
let mut futures: FuturesOrdered<_> = doc
|
||||
.language_servers_with_feature(LanguageServerFeature::WorkspaceSymbols)
|
||||
.filter(|ls| seen_language_servers.insert(ls.id()))
|
||||
.map(|language_server| {
|
||||
|
@ -574,7 +574,7 @@ pub fn code_action(cx: &mut Context) {
|
|||
|
||||
let mut seen_language_servers = HashSet::new();
|
||||
|
||||
let mut futures: FuturesUnordered<_> = doc
|
||||
let mut futures: FuturesOrdered<_> = doc
|
||||
.language_servers_with_feature(LanguageServerFeature::CodeAction)
|
||||
.filter(|ls| seen_language_servers.insert(ls.id()))
|
||||
// TODO this should probably already been filtered in something like "language_servers_with_feature"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue