mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Rust: Prefer completion.label_details over completion.details (#13797)
In doing so we get to surface origin packages more prominently. Fixes #13494 (again) Release Notes: - Fixed origin packages not being surfaced in Rust completions
This commit is contained in:
parent
6d10b16f79
commit
8ec478cbcd
@ -203,12 +203,10 @@ impl LspAdapter for RustLspAdapter {
|
||||
language: &Arc<Language>,
|
||||
) -> Option<CodeLabel> {
|
||||
let detail = completion
|
||||
.detail
|
||||
.label_details
|
||||
.as_ref()
|
||||
.or(completion
|
||||
.label_details
|
||||
.as_ref()
|
||||
.and_then(|detail| detail.detail.as_ref()))
|
||||
.and_then(|detail| detail.detail.as_ref())
|
||||
.or(completion.detail.as_ref())
|
||||
.map(ToOwned::to_owned);
|
||||
match completion.kind {
|
||||
Some(lsp::CompletionItemKind::FIELD) if detail.is_some() => {
|
||||
|
Loading…
Reference in New Issue
Block a user