def in_file

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

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

44# the item of a name in a file
45def in_file(~fs: F.Files, docs: List<&2, Docs.Doc>, +path: String, name: String) -> IO(Maybe<&2, Found>):
46  do IO<Maybe<&2, Found>>:
47    text : String <- load(~fs, docs, "file://" ++ path, path)
48    return found(Outline.find(Outline.items(text), name), "file://" ++ path)

Uses (14)

Used by (3)