def hover.site

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

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

258# a binder of an item is the outline item (signature, then the comment above
259# it). A use is answered the same way `at` answers it, so a call keeps the
260# callee's doc
261def hover.site(
262  ~fs: F.Files,
263  site: Maybe<&2, Bind.Site>,
264  items: List<&2, Outline.Item>,
265  +binds: List<&2, Bind.Bind>,
266  docs: List<&2, Docs.Doc>,
267  uri: String,
268  +name: String
269) -> IO(Maybe<&2, Found>):
270  match site:
271    case Some{Bind.SBind{b}}:
272      hover.bind(~fs, b, items, docs, uri)
273    case other:
274      at.site(~fs, site, binds, items, docs, uri, name)

Uses (12)

Used by (1)