Skip to content

Show documentation on hover #1006

Open
@jiribenes

Description

@jiribenes

Warning

Blocked on #930

On hover, show the attached documentation to that definition:

  1. add a documentation to SymbolInfo:

case class SymbolInfo(
symbol: Symbol,
header: String,
signature: Option[String],
description: Option[String]
) {
def fullDescription: String = {
val sig = signature.map(sig => s"```effekt\n$sig\n```").getOrElse { "" }
val desc = description.getOrElse("")
s"""|#### $header
|$sig
|$desc
|""".stripMargin
}
def shortDescription: String = {
val sig = signature.map(sig => s"```effekt\n$sig\n```").getOrElse { "" }
s"""|#### $header
|$sig
|""".stripMargin
}
}

  1. then populate it here:

def getInfoOf(sym: Symbol)(using C: Context): Option[SymbolInfo] = PartialFunction.condOpt(resolveCallTarget(sym)) {

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions