src/lsp/docs.bend checks
raw source on the hub · import bolt@1.50.0.0/src/lsp/docs.bend as Docs
lsp/docs: the open documents, by URI: what the editor shows, saved or not, and the checker's last word on each (its errors come from the file on disk, the linter's warnings from the text, so both are needed to publish).
4 imports
import Base import ../lazy/lazy.bend as Lazy import ./report.bend as Rep import ../role.bend as Role
Types
type Doc source · line 11 · raw
Data
an open document: its URI, the text the editor shows, the checker's errors from its last run, and the role marks read with them
Doc@uri:String -> @text:String -> @errors:List<&2, 0xb639465bf787ad19500fd0ac3a14266d/src/lsp/report.Diag> -> @marks:List<&2, 0xb639465bf787ad19500fd0ac3a14266d/src/role.Mark> -> Doc
Definitions
def del source · line 15 · raw
@docs:List<&2, Doc> -> @+uri:String -> List<&2, Doc>
the documents without the one at a URI
def errors source · line 24 · raw
@docs:List<&2, Doc> -> @+uri:String -> List<&2, 0xb639465bf787ad19500fd0ac3a14266d/src/lsp/report.Diag>
the checker's errors for a document, none when it is not open
def marks source · line 32 · raw
@docs:List<&2, Doc> -> @+uri:String -> List<&2, 0xb639465bf787ad19500fd0ac3a14266d/src/role.Mark>
the role marks kept for a document, none when it is not open
def set source · line 40 · raw
@+docs:List<&2, Doc> -> @+uri:String -> @text:String -> List<&2, Doc>
a document's text set (opened, or changed); its errors and marks stay
def get source · line 44 · raw
@docs:List<&2, Doc> -> @+uri:String -> Maybe<&2, String>
the text of an open document, when it is open
def set_checked source · line 53 · raw
@+docs:List<&2, Doc> -> @+uri:String -> @errors:List<&2, 0xb639465bf787ad19500fd0ac3a14266d/src/lsp/report.Diag> -> @ms:List<&2, 0xb639465bf787ad19500fd0ac3a14266d/src/role.Mark> -> List<&2, Doc>
a document's errors set, from a run of the checker, with the marks read beside it