honor content_format clientcap

This removes all markdown when the client does not support the markdown MarkupKind

Otherwise the output on the editor will have some markdown boilerplate, making it less readable
This commit is contained in:
Robin van Dijk 2020-10-05 19:27:29 +02:00
parent e5f252ade7
commit c3cc361294
5 changed files with 74 additions and 9 deletions

View file

@ -46,6 +46,7 @@ mod syntax_highlighting;
mod syntax_tree;
mod typing;
mod link_rewrite;
mod markdown_remove;
use std::sync::Arc;
@ -376,8 +377,9 @@ impl Analysis {
&self,
position: FilePosition,
links_in_hover: bool,
markdown: bool,
) -> Cancelable<Option<RangeInfo<HoverResult>>> {
self.with_db(|db| hover::hover(db, position, links_in_hover))
self.with_db(|db| hover::hover(db, position, links_in_hover, markdown))
}
/// Computes parameter information for the given call expression.