mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
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:
parent
e5f252ade7
commit
c3cc361294
5 changed files with 74 additions and 9 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue