def hovered

bolt@1.27.0.0 · src/lsp/server.bend:435

import bolt@1.27.0.0/src/lsp/server.bend as Server
import Base
import emerging-ezjson@1.2.0.0/src/value.bend as J
import bolt@1.27.0.0/src/lsp/docs.bend as Docs
import bolt@1.27.0.0/src/lsp/nav.bend as Nav
import bolt@1.27.0.0/src/lsp/files/service.bend as F
import bolt@1.27.0.0/src/lsp/enc.bend as Enc

435# hover at a request's position
436def hovered(  # noqa: L001 LSP IO glue
437  ~fs: F.Files,
438  ee: Enc.Enc,
439  +docs: List<&2, Docs.Doc>,
440  +uri: String,
441  +params: J.Json
442) -> IO(Work):
443  do IO<Work>:
444    text : String <- Nav.text_of(~fs, docs, uri)
445    f : Maybe<&2, Nav.Found> <- Nav.hover(~fs, docs, uri, line_of(params), col_in(Enc.cols(ee, text), params))
446    return answered(hover.of(f), docs)

Uses (19)

Used by (1)