def candidates

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

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/lsp/files/service.bend as F
import bolt@1.27.0.0/src/lsp/docs.bend as Docs
import bolt@1.27.0.0/src/lsp/proto.bend as Proto

438# what could complete the prefix typed at a line of a document: the locals
439# visible there, then items, each named by the text to insert
440def candidates(
441  ~fs: F.Files,
442  +docs: List<&2, Docs.Doc>,
443  +uri: String,
444  prefix: String,
445  line: U32
446) -> IO(List<&2, Outline.Item>):
447  do IO<List<&2, Outline.Item>>:
448    text : String <- load(~fs, docs, uri, Proto.path(uri))
449    candidates.in(~fs, text, docs, uri, prefix, line)

Uses (11)

Used by (1)