def hover.item

bolt@1.27.0.0 · src/lsp/nav.bend:217

import bolt@1.27.0.0/src/lsp/nav.bend as Nav
import Base
import bolt@1.27.0.0/src/syntax/outline.bend as Outline
import bolt@1.27.0.0/src/syntax/bind.bend as Bind
import bolt@1.27.0.0/src/lsp/files/service.bend as F
import bolt@1.27.0.0/src/lsp/docs.bend as Docs

217# the outline item a top-level name hovers as. `Alias.law` is the law in the
218# file behind Alias (the comment lives there); a bare name is this document's
219def hover.item(
220  ~fs: F.Files,
221  +name: String,
222  items: List<&2, Outline.Item>,
223  docs: List<&2, Docs.Doc>,
224  +uri: String,
225  bb: Bind.Bind
226) -> IO(Maybe<&2, Found>):
227  do IO<Maybe<&2, Found>>:
228    m : Maybe<&2, Found> <- resolve(~fs, docs, uri, name)
229    return hover.pick(m, found(Outline.find(items, name), uri), uri, bb)

Uses (15)

Used by (1)