-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Upgrade IDE dependencies, release vscode-dotty 0.1.5 #4828
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
Upgrade IDE dependencies, release vscode-dotty 0.1.5 #4828
Conversation
cbf2209
to
030a2f8
Compare
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'll defer to @Duhemm for the code that has to do with rendering and testing the comments in the IDE
markup.setValue( | ||
s"""```scala | ||
|$typeInfo | ||
|$docMarkup```""".stripMargin.stripLineEnd) |
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.
Why stripLineEnd
? Also shouldn't the ``` be on a new line?
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.
Right, fixed.
else { | ||
val symbol = Interactive.enclosingSourceSymbol(trees, pos) | ||
val docComment = ctx.docCtx.flatMap(_.docstring(symbol)) | ||
val markedStrings = docMarkedStrings(docComment, tpw.show.toString) | ||
new Hover(markedStrings.map(JEither.forRight(_)).asJava, null) | ||
val content = hoverContent(tpw.show.toString, docComment) |
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.
toString
redundant after show
?
On the server side, uses of lsp4j.MarkedString were replaced by lsp4j.MarkupContent since the former is deprecated (and seems to cause some rendering bugs with the updated dependencies).
030a2f8
to
e626618
Compare
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.
Apart from that, LGTM.
s"""```scala | ||
|$typeInfo | ||
|$comment | ||
|```""" |
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.
There used to be a thin line that separated the type info from the comment. It would be nice to re-introduce it, since it makes the hover information easier to read:
case Some(comment) =>
s"""```scala
|$typeInfo
|```
|---
|```scala
|$comment
|```"""
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 tried that but that's not equivalent to the thin line we had before: it adds a really thick line which I find distracting
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.
There's an issue for this: microsoft/language-server-protocol#518
I'm going to merge this, however I won't release 0.1.5 until the next Dotty release: it looks like recent version of vscode-languageclient do not agree with LSP4J on how to read the content of MarkedString in hover responses, the result is that when using vscode-dotty 0.1.5 with Dotty 0.9.0-RC1, the hover messages just displays |
On the server side, uses of lsp4j.MarkedString were replaced by
lsp4j.MarkupContent since the former is deprecated (and seems to cause
some rendering bugs with the updated dependencies).