File tree 1 file changed +5
-6
lines changed
language-server/src/dotty/tools/languageserver
1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -442,9 +442,9 @@ class DottyLanguageServer extends LanguageServer
442
442
Interactive .enclosingSourceSymbols(path, pos) match {
443
443
case Nil =>
444
444
null
445
- case symbol :: _ =>
446
- val docComment = ParsedComment .docOf(symbol )
447
- val content = hoverContent(Some (tpw.show), docComment )
445
+ case symbols =>
446
+ val docComments = symbols.flatMap( ParsedComment .docOf)
447
+ val content = hoverContent(Some (tpw.show), docComments )
448
448
new Hover (content, null )
449
449
}
450
450
}
@@ -810,7 +810,7 @@ object DottyLanguageServer {
810
810
}
811
811
812
812
private def hoverContent (typeInfo : Option [String ],
813
- comment : Option [ParsedComment ]
813
+ comments : List [ParsedComment ]
814
814
)(implicit ctx : Context ): lsp4j.MarkupContent = {
815
815
val buf = new StringBuilder
816
816
typeInfo.foreach { info =>
@@ -819,8 +819,7 @@ object DottyLanguageServer {
819
819
|```
820
820
| """ .stripMargin)
821
821
}
822
-
823
- comment.foreach { comment =>
822
+ comments.foreach { comment =>
824
823
buf.append(comment.renderAsMarkdown)
825
824
}
826
825
You can’t perform that action at this time.
0 commit comments