Module Cobol_lsp.Types

Definitions of module aliases and helper functors

module URIMap : sig ... end
type params = {
  1. config : Cobol_lsp__.Lsp_server.TYPES.config;
  2. root_uri : Lsp.Types.DocumentUri.t option;
  3. workspace_folders : Lsp.Types.DocumentUri.t list;
  4. with_semantic_tokens : bool;
  5. with_client_config_watcher : bool;
  6. with_client_file_watcher : [ `no | `yes of [ `absolute | `any ] ];
}
type registry = private {
  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 : params;
}
and sub_state
and pending_tasks
type state =
  1. | NotInitialized of Cobol_lsp__.Lsp_server.TYPES.config
  2. | Initialized of params
  3. | Running of registry
  4. | ShuttingDown
  5. | Exit of exit_status
and exit_status = (unit, string) Stdlib.result
type 'a 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 diagnostics = Lsp.Types.Diagnostic.t list Stdlib__Map.Make(Lsp.Uri).t
type element_at_position = {
  1. element_at_position : element_in_context option;
  2. enclosing_compilation_unit_name : string option;
}

Information returned by Lookup.element_at_position.

and element_in_context =
  1. | Data_name of Cobol_ptree.qualname
  2. | Data_full_name of Cobol_ptree.qualname
  3. | Data_item of {
    1. full_qn : Cobol_ptree.qualname option;
    2. def_loc : Cobol_common.Srcloc.TYPES.srcloc;
    }
  4. | Proc_name of {
    1. qn : Cobol_ptree.qualname;
    2. in_section : Cobol_unit.Types.procedure_section option;
    }
type name_definition = {
  1. as_paragraph : paragraph_definition option;
  2. as_item : item_definition option;
}
type copy_operation = string Cobol_common.Srcloc.TYPES.with_loc

with loc of COPY ...

type approx_typing_info =
  1. | Alphanum
  2. | Any
  3. | Boolean
  4. | Condition
  5. | Group
  6. | Index
  7. | Numeric
  8. | NumericEdited
  9. | ObjectRef
  10. | Pointer
type procedure_at_position = {
  1. cu : Cobol_unit.Types.cobol_unit option;
  2. proc_name : Cobol_ptree.qualname option;
}
type document = {
  1. project : Superbol_project__.Project.TYPES.project;
  2. textdoc : Lsp.Text_document.t;
  3. copybook : bool;
  4. artifacts : Cobol_parser.Outputs.artifacts;
  5. checked : checked_doc option;
  6. rewinder : rewinder option;
  7. parsing_diags : Cobol_parser.Diagnostics.ALL.t;
  8. typecking_diags : Cobol_typeck.Diagnostics.t;
}
and checked_doc = Cobol_typeck.Outputs.t
exception Unparseable of Lsp.Types.DocumentUri.t

Raised by Document.checked.

exception Copybook of Lsp.Types.DocumentUri.t
exception Internal_error of document * exn * Stdlib.Printexc.raw_backtrace

Raised by Document.load and Document.update; allows keeping consistent document contents.

type cached = {
  1. doc_cache_filename : string;
  2. doc_cache_checksum : Stdlib.Digest.t;
  3. doc_cache_langid : string;
  4. doc_cache_version : int;
  5. doc_cache_pplog : Cobol_preproc.Trace.log;
  6. doc_cache_tokens : Cobol_parser.Outputs.tokens_with_locs;
  7. doc_cache_comments : Cobol_preproc.Text.comments;
  8. doc_cache_ignored : Cobol_common.Srcloc.lexloc list;
  9. doc_cache_checked : checked_doc option;
  10. doc_cache_parsing_diags : Cobol_parser.Diagnostics.ALL.t;
  11. doc_cache_typecking_diags : Cobol_typeck.Diagnostics.t;
}

Persistent representation (for caching)

include module type of Superbol_project.Config.TYPES
type path =
  1. | RelativeToProjectRoot of string
  2. | RelativeToFileDir of string
exception ERROR of Superbol_project__.Project_diagnostics.error
include module type of Superbol_project.TYPES
type rootdir
type project = {
  1. rootdir : rootdir;
  2. config : Superbol_project__.Project_config.TYPES.config;
  3. config_filename : string;
}
type layout = {
  1. project_config_filename : string;
    (*

    Name of the TOML file that is to be found at the root of each project's directory tree.

    *)
  2. relative_work_dirname : string option;
    (*

    Relative name of a directory where the LSP should put its working files (caches, etc). No such storage is allowed when None.

    *)
  3. rootdir_fallback_policy : rootdir_fallback_policy;
    (*

    Policy to determine the root directory of projects based on individual filenames.

    *)
}
and rootdir_fallback_policy =
  1. | Same_as_file_directory
  2. | Given_directory of string
type storage =
  1. | No_storage
  2. | Store_in_file of {
    1. relative_filename : string;
    }
  3. | Store_in_shared_dir of {
    1. dirname : string;
    }
type config = {
  1. cache_storage : storage;
  2. cache_verbose : bool;
}
type alternate_handler = {
  1. h : 'reply. 'reply Lsp.Client_request.t -> Cobol_lsp__.Lsp_server.TYPES.registry -> ('reply * Cobol_lsp__.Lsp_server.TYPES.registry, 'reply Cobol_lsp__.Lsp_server.TYPES.error) Stdlib.result;
}