package vscoq-language-server
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=9ccbe96d94fdb50b82934df09344cab3
sha512=fb26617cb85f8958433982300edb53b194e2af267e1a9bee98f64cf45d4114407f026eefc6f2f07812906007847e5ac6e47d4602c13a30f3359cda639321fc58
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 ->
observe_id option ->
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.
clear_observe_id state updates the state to make the observe_id None
reset_to_top state updates the state to make the observe_id Top
val get_next_range :
state ->
Protocol.LspWrapper.Position.t ->
Protocol.LspWrapper.Range.t optionget_next_range st pos get the range of the next sentence relative to pos
val get_previous_range :
state ->
Protocol.LspWrapper.Position.t ->
Protocol.LspWrapper.Range.t optionget_previous_pos st pos get the range of the previous sentence relative to pos
interpret_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 = {processing : Protocol.LspWrapper.Range.t list;processed : 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