mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Modify hover info to show module path separated by a line
This commit is contained in:
parent
7fece3bdd2
commit
5043c9ce9c
1 changed files with 3 additions and 3 deletions
|
@ -79,14 +79,14 @@ pub(crate) fn rust_code_markup_with_doc(
|
|||
doc: Option<&str>,
|
||||
mod_path: Option<&str>,
|
||||
) -> String {
|
||||
let mut buf = "```rust\n".to_owned();
|
||||
let mut buf = "".to_owned();
|
||||
|
||||
if let Some(mod_path) = mod_path {
|
||||
if !mod_path.is_empty() {
|
||||
format_to!(buf, "{}\n\n", mod_path);
|
||||
format_to!(buf, "{}\n___\n", mod_path);
|
||||
}
|
||||
}
|
||||
format_to!(buf, "{}\n```", code);
|
||||
format_to!(buf, "```rust\n\n{}\n```", code);
|
||||
|
||||
if let Some(doc) = doc {
|
||||
format_to!(buf, "\n\n{}", doc);
|
||||
|
|
Loading…
Reference in a new issue