File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
language-server/src/dotty/tools/languageserver Expand file tree Collapse file tree 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
442442 Interactive .enclosingSourceSymbols(path, pos) match {
443443 case Nil =>
444444 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 )
448448 new Hover (content, null )
449449 }
450450 }
@@ -810,7 +810,7 @@ object DottyLanguageServer {
810810 }
811811
812812 private def hoverContent (typeInfo : Option [String ],
813- comment : Option [ParsedComment ]
813+ comments : List [ParsedComment ]
814814 )(implicit ctx : Context ): lsp4j.MarkupContent = {
815815 val buf = new StringBuilder
816816 typeInfo.foreach { info =>
@@ -819,8 +819,7 @@ object DottyLanguageServer {
819819 |```
820820 | """ .stripMargin)
821821 }
822-
823- comment.foreach { comment =>
822+ comments.foreach { comment =>
824823 buf.append(comment.renderAsMarkdown)
825824 }
826825
You can’t perform that action at this time.
0 commit comments