def symbols

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

import bolt@1.27.0.0/src/lsp/server.bend as Server
import Base
import bolt@1.27.0.0/src/lsp/proto.bend as Proto
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
import bolt@1.27.0.0/src/syntax/outline.bend as Outline

544# the document's symbols
545def symbols(~fs: F.Files, ee: Enc.Enc, +docs: List<&2, Docs.Doc>, +uri: String) -> IO(Work):  # noqa: L001 LSP IO glue
546  do IO<Work>:
547    text : String <- Nav.text_of(~fs, docs, uri)
548    items : List<&2, Outline.Item> <- Nav.outline(~fs, docs, uri)
549    return answered(Proto.symbols(Enc.cols(ee, text), items), docs)

Uses (15)

Used by (1)