package vscoq-language-server
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=a7d0911ab8c12221c5fecc73ecc67d1b
sha512=194b144b3bac35f3ef7d1b92715b7260267817c01b1855113799c6055b1510aa18dbeb03ceced0bcaf9e5d92f6c1aca2c21d858bef53ec5b0d6c12cf73860664
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)
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