Skip to content

Commit

Permalink
Add docs to completion
Browse files Browse the repository at this point in the history
  • Loading branch information
alexheretic committed Jun 9, 2018
1 parent 7d0bc55 commit dbf02eb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lsp_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,13 @@ pub fn completion_item_from_racer_match(m: &racer::Match) -> CompletionItem {
let mut item = CompletionItem::new_simple(m.matchstr.clone(), m.contextstr.clone());
item.kind = Some(completion_kind_from_match_type(m.mtype.clone()));

if !m.docs.is_empty() {
item.documentation = Some(Documentation::MarkupContent(MarkupContent {
kind: MarkupKind::Markdown,
value: m.docs.clone(),
}));
}

item
}

Expand Down

0 comments on commit dbf02eb

Please sign in to comment.