901: Add basic support for showing fn signature when hovering r=matklad a=vipentti

This adds basic support for displaying function signature when hovering over a usage of a function. 

Additionally refactored `hover` to return `HoverResult` to ease with testing and in general to be more robust.

Co-authored-by: Ville Penttinen <villem.penttinen@gmail.com>
This commit is contained in:
bors[bot] 2019-02-27 11:50:38 +00:00
commit 1927eb088a
4 changed files with 179 additions and 21 deletions

View file

@ -441,7 +441,7 @@ pub fn handle_hover(
let res = Hover {
contents: HoverContents::Markup(MarkupContent {
kind: MarkupKind::Markdown,
value: info.info,
value: info.info.to_markup(),
}),
range: Some(range),
};