def references
bolt@1.27.0.0 · src/lsp/server.bend:503
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
503
504def references(
505 ~fs: F.Files,
506 ee: Enc.Enc,
507 +docs: List<&2, Docs.Doc>,
508 +uri: String,
509 +params: J.Json
510) -> IO(Work):
511 do IO<Work>:
512 +text : String <- Nav.text_of(~fs, docs, uri)
513 +cc : Enc.Cols = Enc.cols(ee, text)
514 +line : U32 = line_of(params)
515 +col : U32 = col_in(cc, params)
516 s : Nav.Sites <- Nav.sites(~fs, docs, uri, line, col)
517 return answered(references.of(cc, s, uri, Word.at(text, line, col)), docs)