Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 206a9fb

Browse files
authored
Merge pull request #903 from alexheretic/completion-docs
Add docs to completion
2 parents 0ec9a6b + dbf02eb commit 206a9fb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/lsp_data.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,13 @@ pub fn completion_item_from_racer_match(m: &racer::Match) -> CompletionItem {
229229
let mut item = CompletionItem::new_simple(m.matchstr.clone(), m.contextstr.clone());
230230
item.kind = Some(completion_kind_from_match_type(m.mtype.clone()));
231231

232+
if !m.docs.is_empty() {
233+
item.documentation = Some(Documentation::MarkupContent(MarkupContent {
234+
kind: MarkupKind::Markdown,
235+
value: m.docs.clone(),
236+
}));
237+
}
238+
232239
item
233240
}
234241

0 commit comments

Comments
 (0)