aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/display.rs
diff options
context:
space:
mode:
authorAaron Loucks <[email protected]>2020-05-26 04:18:45 +0100
committerAaron Loucks <[email protected]>2020-05-26 04:18:45 +0100
commita047f10839d64813213c70ed60c37c0a99f232b2 (patch)
tree7a79d631ba9ed42ad0d6a1133c54976a65c82760 /crates/ra_ide/src/display.rs
parent76fa498d6c69a8c26f074b15178256041bb53675 (diff)
Hover tooltip module name is monospace once again
The line separator is moved below the function signature to split regions between the docs. This is very similar to how IntelliJ displays tooltips. Adding an additional separator between the module name and function signature currently has rendering issues. Fixes #4594 Alternative to #4615
Diffstat (limited to 'crates/ra_ide/src/display.rs')
-rw-r--r--crates/ra_ide/src/display.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide/src/display.rs b/crates/ra_ide/src/display.rs
index 8bb312156..827c094e7 100644
--- a/crates/ra_ide/src/display.rs
+++ b/crates/ra_ide/src/display.rs
@@ -83,12 +83,13 @@ pub(crate) fn rust_code_markup_with_doc(
83 83
84 if let Some(mod_path) = mod_path { 84 if let Some(mod_path) = mod_path {
85 if !mod_path.is_empty() { 85 if !mod_path.is_empty() {
86 format_to!(buf, "{}\n___\n\n", mod_path); 86 format_to!(buf, "```rust\n{}\n```\n\n", mod_path);
87 } 87 }
88 } 88 }
89 format_to!(buf, "```rust\n{}\n```", code); 89 format_to!(buf, "```rust\n{}\n```", code);
90 90
91 if let Some(doc) = doc { 91 if let Some(doc) = doc {
92 format_to!(buf, "\n___");
92 format_to!(buf, "\n\n{}", doc); 93 format_to!(buf, "\n\n{}", doc);
93 } 94 }
94 95