Module Superbol_vscode_lib.Instance

type t
val make : lsp_server_prefix:string -> context:Vscode.ExtensionContext.t -> t
val subscribe_disposable : t -> Vscode.Disposable.t -> unit
val client : t -> client option
val context : t -> Vscode.ExtensionContext.t
val cli_invocation : t -> Superbol_vscode_lib__.Superbol_languageclient.cli_invocation

See Superbol_languageclient.cli_invocation.

val on_language_server_start : t -> (client -> unit) -> unit

on_language_server_start t hook has hook called with the client each time start_language_server has (re)started the language server.

val stop_language_server : t -> unit Promise.t
val start_language_server : t -> unit Promise.t
val start_autorestarter : t -> unit

Generic access functions

val with_context_and_client : f:(context:Vscode.ExtensionContext.t -> client:client -> 'result) -> t -> ('a, Superbol_vscode_lib__.Superbol_types.error) Stdlib.result Promise.t as 'result
val lsp_request : meth:string -> data:Jsonoo.t -> t -> (Jsonoo.t, Superbol_vscode_lib__.Superbol_types.error) Stdlib.result Promise.t
val lsp_notification : meth:string -> data:Jsonoo.t -> t -> unit
val current_document_uri : ?text_editor:Vscode.TextEditor.t -> unit -> Vscode.Uri.t option
module JSON : sig ... end
val write_project_config : ?text_editor:Vscode.TextEditor.t -> t -> unit Promise.t
val get_project_config : ?text_editor:Vscode.TextEditor.t -> t -> ((string, Jsonoo.t) Stdlib.Hashtbl.t, Superbol_vscode_lib__.Superbol_types.error) Stdlib.result Promise.t
val toggle_comments : ?text_editor:Vscode.TextEditor.t -> t -> (unit, Superbol_vscode_lib__.Superbol_types.error) Stdlib.result Promise.t
val save_untitled_document : ?text_editor:Vscode.TextEditor.t -> t -> unit Promise.t

Saves the untitled document of the active (or given) text editor, proposing a file name derived from the name of its first program (or other compilation unit), if any.