def hover.kind

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

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

231# a def, law or type is its outline item; any other binder is itself
232def hover.kind(
233  ~fs: F.Files,
234  kind: Bind.BindKind,
235  name: String,
236  items: List<&2, Outline.Item>,
237  docs: List<&2, Docs.Doc>,
238  uri: String,
239  bb: Bind.Bind
240) -> IO(Maybe<&2, Found>):
241  match kind:
242    case Bind.KItem{}:
243      hover.item(~fs, name, items, docs, uri, bb)
244    case other:
245      IO.pure(Maybe<&2, Found>, Some{Here{uri, bb}})

Uses (12)

Used by (1)