Skip to content

Commit 019142c

Browse files
committed
Bug Fix: Auto import has broken for vim-lsp
1. Because of change the in [1], vim-lsp cannot complete the auto import items. May be, it`s better to use the method completion_item_edit_resolve [2] to resovle this problem. Also, maybe this change is only a workaround. close the bug #19401 [1]: https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/lsp/capabilities.rs#L188 [2]: https://github.com/rust-lang/rust-analyzer/blob/master/crates/rust-analyzer/src/lsp/capabilities.rs#L211
1 parent a6c1fa0 commit 019142c

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

crates/rust-analyzer/src/lsp/capabilities.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Advertises the capabilities of the LSP Server.
2-
use ide::{CompletionFieldsToResolve, InlayFieldsToResolve};
2+
use ide::InlayFieldsToResolve;
33
use ide_db::{FxHashSet, line_index::WideEncoding};
44
use lsp_types::{
55
CallHierarchyServerCapability, CodeActionKind, CodeActionOptions, CodeActionProviderCapability,
@@ -186,10 +186,7 @@ impl ClientCapabilities {
186186
}
187187

188188
fn completions_resolve_provider(&self) -> bool {
189-
let client_capabilities = self.completion_resolve_support_properties();
190-
let fields_to_resolve =
191-
CompletionFieldsToResolve::from_client_capabilities(&client_capabilities);
192-
fields_to_resolve != CompletionFieldsToResolve::empty()
189+
self.completion_item_edit_resolve()
193190
}
194191

195192
fn inlay_hints_resolve_provider(&self) -> bool {

0 commit comments

Comments
 (0)