-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add markdown formatting to hover messages #1396
Conversation
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Rather than caching the rendered text in the hovers structure, is it possible to only render it on demand, i.e. the hovers contains enough information to render the text, but not the rendered text? I guess this would mean storing some sort of |
@seanyoung Sure, that should be possible, but with a caveat. |
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
src/bin/languageserver/mod.rs
Outdated
@@ -1,5 +1,8 @@ | |||
// SPDX-License-Identifier: Apache-2.0 | |||
|
|||
#![allow(unstable_name_collisions)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to use the fully qualified syntax itertools::Itertools::intersperse(...)
instead of disabling the lint (as clippy suggests)
src/bin/languageserver/mod.rs
Outdated
contents: HoverContents::Scalar(MarkedString::String( | ||
hover.val.to_string(), | ||
)), | ||
// contents: HoverContents::Scalar(MarkedString::String( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented out code is almost never kept in the source (if there is a good exception, you can explain in a comment why it should be kept instead).
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
We have descriptions for the builtins in |
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
We are already making use of |
This may be due to the fact that the range
I was able to get hovers displayed for variables of length 1 by incrementing the intervals' But adding 1 everywhere looks a bit weird. TL;DR - |
@chioni16 this is already looking much better. I do have some more observations:
function test.bar(uint32 x, uint32 y) public returns (uint32) There is also a needless newline between the doc comment and the prototype.
|
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
7b331db
to
347ebe5
Compare
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
347ebe5
to
b1ce7a3
Compare
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Signed-off-by: Govardhan G D <chioni1620@gmail.com>
Thanks @chioni16 |
No description provided.