Auto merge of #12807 - Veykril:completion-item-details, r=Veykril

Add simple support for completion item details

Supercedes https://github.com/rust-lang/rust-analyzer/pull/9891

This doesn't yet really implement anything new, it just adds the scaffolding for the protocol conversion
This commit is contained in:
bors
2022-07-18 17:28:43 +00:00
3 changed files with 38 additions and 11 deletions

View File

@@ -833,6 +833,20 @@ impl Config {
)
}
pub fn completion_label_details_support(&self) -> bool {
try_!(self
.caps
.text_document
.as_ref()?
.completion
.as_ref()?
.completion_item
.as_ref()?
.label_details_support
.as_ref()?)
.is_some()
}
pub fn offset_encoding(&self) -> OffsetEncoding {
if supports_utf8(&self.caps) {
OffsetEncoding::Utf8