Skip to content

Commit

Permalink
Merge pull request #18714 from Veykril/push-krxvsqwrokwp
Browse files Browse the repository at this point in the history
fix: Do not ask the client to resolve for non existing label details
  • Loading branch information
Veykril authored Dec 18, 2024
2 parents d7fa33e + 683150f commit e1b7d77
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/rust-analyzer/src/lsp/to_proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,11 @@ fn completion_item(
};

if config.completion_label_details_support() {
let has_label_details =
item.label.detail_left.is_some() || item.label.detail_left.is_some();
if fields_to_resolve.resolve_label_details {
something_to_resolve |= true;
} else if item.label.detail_left.is_some() || item.label.detail_left.is_some() {
something_to_resolve |= has_label_details;
} else if has_label_details {
lsp_item.label_details = Some(lsp_types::CompletionItemLabelDetails {
detail: item.label.detail_left.clone(),
description: item.label.detail_right.clone(),
Expand Down

0 comments on commit e1b7d77

Please sign in to comment.