def complete

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

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
import bolt@1.27.0.0/src/syntax/word.bend as Word

475# the candidates for the name being typed at a position
476def complete(  # noqa: L001 LSP IO glue
477  ~fs: F.Files,
478  ee: Enc.Enc,
479  +docs: List<&2, Docs.Doc>,
480  +uri: String,
481  +params: J.Json
482) -> IO(Work):
483  do IO<Work>:
484    +text : String <- Nav.text_of(~fs, docs, uri)
485    +cc : Enc.Cols = Enc.cols(ee, text)
486    +line : U32 = line_of(params)
487    +col : U32 = col_in(cc, params)
488    complete.with(~fs, cc, Word.before(text, line, col), docs, uri, line, col)

Uses (17)

Used by (1)