package vscoq-language-server
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=8a4ff41372c157688170f0174e58d646
sha512=852f4e8cc7e687805e0707368a5625ef3c226d1373f677a731d32a04f8d0cb2f5d64ffdf350b0a5e446ff5075982dc36f2bc9d533d3862009f73fc22fd04fcc0
doc/vscoq-language-server.dm/Dm/DocumentManager/index.html
Module Dm.DocumentManagerSource
The document manager holds the view that Coq has of the currently open states. It makes it easy for IDEs to handle text edits, navigate and get feedback. Note that it does not require IDEs to parse vernacular sentences.
val init :
Vernacstate.t ->
opts:Coqargs.injection_command list ->
Lsp.Types.DocumentUri.t ->
text:string ->
state * eventsinit st opts uri text initializes the document manager with initial vernac state st on which command line opts will be set.
apply_text_edits doc edits updates the text of doc with edits. The new document is parsed, outdated executions states are invalidated, and the observe id is updated.
val interpret_to_position :
stateful:bool ->
state ->
Protocol.LspWrapper.Position.t ->
state * eventsinterpret_to_position stateful doc pos navigates to the last sentence ending before or at pos and returns the resulting state. The stateful flag determines if we record the resulting position in the state.
interpret_to_previous doc navigates to the previous sentence in doc and returns the resulting state.
interpret_to_next doc navigates to the next sentence in doc and returns the resulting state.
interpret_to_end doc navigates to the last sentence in doc and returns the resulting state.
interpret_in_background doc same as interpret_to_end but computation is done in background (with lower priority)
type exec_overview = {parsed : Protocol.LspWrapper.Range.t list;checked : Protocol.LspWrapper.Range.t list;checked_by_delegate : Protocol.LspWrapper.Range.t list;legacy_highlight : Protocol.LspWrapper.Range.t list;
}returns the ranges corresponding to the sentences that have been executed and remotely executes
returns the range of the sentence referenced by observe_id *
val get_messages :
state ->
Protocol.LspWrapper.Position.t option ->
(Protocol.LspWrapper.DiagnosticSeverity.t * Protocol.Printing.pp) listall_diagnostics doc returns the diagnostics corresponding to the sentences that have been executed in doc.
val get_proof :
state ->
Protocol.Settings.Goals.Diff.Mode.t ->
Protocol.LspWrapper.Position.t option ->
Protocol.ProofState.t optionval get_completions :
state ->
Protocol.LspWrapper.Position.t ->
(CompletionItems.completion_item list, string) Result.thandles events and returns a new state if it was updated
val search :
state ->
id:string ->
Protocol.LspWrapper.Position.t ->
string ->
Protocol.LspWrapper.notification Sel.Event.t listval about :
state ->
Protocol.LspWrapper.Position.t ->
pattern:string ->
(Protocol.Printing.pp, string) Result.tReturns an optional Result: if None, the position did not have a word, if Some, an Ok/Error result is returned.
val check :
state ->
Protocol.LspWrapper.Position.t ->
pattern:string ->
(Protocol.Printing.pp, string) Result.tval locate :
state ->
Protocol.LspWrapper.Position.t ->
pattern:string ->
(Protocol.Printing.pp, string) Result.tval print :
state ->
Protocol.LspWrapper.Position.t ->
pattern:string ->
(Protocol.Printing.pp, string) Result.t