bolt/lsp/docs.bend checks
raw source on the hub · import 0x729eecea86ea5a2cdba3a2856a313bca/bolt/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).
3 imports
import Base import ../../lazy/lazy.bend as Lazy import ./report.bend as Rep
Types
type Doc source · line 10 · raw
Data
an open document: its URI, the text the editor shows, the checker's errors from its last run
Doc@uri:String -> @text:String -> @errors:List<&2, 0x729eecea86ea5a2cdba3a2856a313bca/bolt/lsp/report.Diag> -> Doc
Definitions
def del source · line 14 · raw
@docs:List<&2, Doc> -> @+uri:String -> List<&2, Doc>
the documents without the one at a URI
def errors source · line 23 · raw
@docs:List<&2, Doc> -> @+uri:String -> List<&2, 0x729eecea86ea5a2cdba3a2856a313bca/bolt/lsp/report.Diag>
the checker's errors for a document, none when it is not open
def set source · line 31 · raw
@+docs:List<&2, Doc> -> @+uri:String -> @text:String -> List<&2, Doc>
a document's text set (opened, or changed); its errors stay
def get source · line 35 · raw
@docs:List<&2, Doc> -> @+uri:String -> Maybe<&2, String>
the text of an open document, when it is open
def set_errors source · line 43 · raw
@+docs:List<&2, Doc> -> @+uri:String -> @errors:List<&2, 0x729eecea86ea5a2cdba3a2856a313bca/bolt/lsp/report.Diag> -> List<&2, Doc>
a document's errors set, from a run of the checker