Module Cobol_lsp.Server

module TYPES : sig ... end
include module type of TYPES with type sub_state = TYPES.sub_state and type pending_tasks = TYPES.pending_tasks and type registry = TYPES.registry and type state = TYPES.state and type exit_status = TYPES.exit_status and type 'a error = 'a TYPES.error
type registry = TYPES.registry = {
  1. projects : Cobol_lsp__.Lsp_project.SET.t;
  2. docs : Cobol_lsp__.Lsp_document.TYPES.document Stdlib__Map.Make(Lsp.Uri).t;
  3. indirect_diags : Lsp.Types.Diagnostic.t list Stdlib__Map.Make(Lsp.Uri).t Stdlib__Map.Make(Lsp.Uri).t;
  4. pending_tasks : pending_tasks;
  5. sub_state : sub_state;
  6. params : Cobol_lsp__.Lsp_types.params;
}
and sub_state = TYPES.sub_state
and pending_tasks = TYPES.pending_tasks
type state = TYPES.state =
  1. | NotInitialized of Cobol_lsp__.Lsp_types.lsp_config
  2. | Initialized of Cobol_lsp__.Lsp_types.params
  3. | Running of registry
  4. | ShuttingDown
  5. | Exit of exit_status
and exit_status = TYPES.exit_status
type 'a error = 'a TYPES.error =
  1. | InvalidStatus of state
  2. | UnhandledRequest of 'a Lsp.Client_request.t
  3. | UnknownRequest of string
exception Document_not_found of Lsp.Types.TextDocumentIdentifier.t
type t = registry
val init : params:Cobol_lsp__.Lsp_types.params -> t
val on_change_workspace_folders : Lsp.Types.DidChangeWorkspaceFoldersParams.t -> t -> t
val did_open : Lsp.Types.DidOpenTextDocumentParams.t -> t -> t

Copybook detection is performed via project configuration (see Lsp_project.detect_copybook).

val did_change : Lsp.Types.DidChangeTextDocumentParams.t -> t -> t
val did_save : Lsp.Types.DidSaveTextDocumentParams.t -> t -> t

Persists the document's cache, the file and what was parsed being known to agree at that point.

val did_close : Lsp.Types.DidCloseTextDocumentParams.t -> t -> t
val find_document : Lsp.Types.TextDocumentIdentifier.t -> t -> Cobol_lsp__.Lsp_document.TYPES.document
val publish_cached_diagnostics : Lsp.Uri.t list -> t -> t * Lsp.Uri.t list

publish_cached_diagnostics uris registry publishes the cached diagnostics of the documents at uris that are not open, along with those they report for other documents (typically copybooks). Returns the URIs of the documents whose diagnostics are not cached or are out-dated, or that belong to no known project.

val jsonrpc_of_error : 'a error -> string -> Jsonrpc.Response.Error.t
val on_client_response : int -> Lsp.Import.Json.t -> t -> t
val on_client_error : int -> t -> t
val on_client_config_changes : ?changes:Yojson.Safe.t -> t -> t
val on_watched_file_changes : Lsp.Types.FileEvent.t list -> t -> t
val on_write_project_config_command : ?uri:Lsp.Uri.t -> t -> t
val get_project_config_command : Lsp.Uri.t -> t -> Yojson.Safe.t
val save_project_caches : t -> unit

Note: May only raise Jsonrpc.Response.Error.E