Cobol_lsp.TypesDefinitions of module aliases and helper functors
module CUs = Cobol_unit.Collections.SETmodule CUMap = Cobol_unit.Collections.MAPmodule URIMap : sig ... endtype lsp_config = {lsp_project_layout : Superbol_project.layout;Describes the layout of projects to be managed by the LSP
*)lsp_cache_for : rootdir:string -> Superbol_cache.Cache.t;cache_for looks up a cache based on a given project directory. An application with no file-system at hand passes Superbol_cache.Cache.disabled, which disables caching: every lookup misses and nothing is stored.
lsp_cache_pruning_policy : Superbol_cache.Types.prune_policy;What a cache is allowed to keep, and/or for how long.
*)lsp_cache_verbose : bool;Make the LSP server report some information on its operations on project caches.
*)enable_client_configs : bool;Enable requests for configuration settings to the client.
*)force_syntax_diagnostics : bool;Force reporting of syntax and pre-processor-related diagnostics (for dialects other that COBOL85, for which they are always enabled).
*)}type params = {config : lsp_config;root_uri : Lsp.Types.DocumentUri.t option;workspace_folders : Lsp.Types.DocumentUri.t list;with_semantic_tokens : bool;with_client_config_watcher : bool;with_client_file_watcher : [ `no | `yes of [ `absolute | `any ] ];position_encoding : [ `UTF8 | `UTF16 ];}type registry = private {projects : Cobol_lsp__.Lsp_project.SET.t;docs : Cobol_lsp__.Lsp_document.TYPES.document Stdlib__Map.Make(Lsp.Uri).t;indirect_diags : Lsp.Types.Diagnostic.t list Stdlib__Map.Make(Lsp.Uri).t
Stdlib__Map.Make(Lsp.Uri).t;pending_tasks : pending_tasks;sub_state : sub_state;params : Cobol_lsp__.Lsp_types.params;}type state = | NotInitialized of Cobol_lsp__.Lsp_types.lsp_config| Initialized of Cobol_lsp__.Lsp_types.params| Running of registry| ShuttingDown| Exit of exit_statustype 'a error = | InvalidStatus of state| UnhandledRequest of 'a Lsp.Client_request.t| UnknownRequest of stringtype element_at_position = {element_at_position : element_in_context option;enclosing_compilation_unit_name : string option;}Information returned by Lookup.element_at_position.
and element_in_context = | Data_name of Cobol_ptree.qualname| Data_full_name of Cobol_ptree.qualname| Data_item of {full_qn : Cobol_ptree.qualname option;item_loc : Cobol_common.Srcloc.TYPES.srcloc;}| Proc_name of {qn : Cobol_ptree.qualname;enclosing_section : Cobol_unit.Types.section option;}| Preproc_or_compilation_variable_ref of {def : Cobol_preproc.Env.var_definition;use : [ `Substitution | `Evaluation | `Definition ];loc : Cobol_common.Srcloc.TYPES.srcloc;}type name_definition = {as_paragraph : paragraph_definition option;as_item : item_definition option;}and paragraph_definition =
Cobol_ptree.paragraph Cobol_common.Srcloc.TYPES.with_locand item_definition =
Cobol_data.Types.item_definition Cobol_common.Srcloc.TYPES.with_loctype copy_operation = string Cobol_common.Srcloc.TYPES.with_locwith loc of COPY ...
type procedure_at_position = {cu : Cobol_unit.Types.cobol_unit option;proc_name : Cobol_ptree.qualname option;}type document = {project : Superbol_project__.Project.TYPES.project;textdoc : Lsp.Text_document.t;copybook : bool;artifacts : Cobol_parser.Outputs.artifacts;semtoks : Superbol_project.Semantic_tokens.t Stdlib.Lazy.t option;checked : checked_doc option;rewinder : rewinder option;recorder : Superbol_cache.Recorder.t option;parsing_diags : Cobol_parser.Diagnostics.ALL.t;typecking_diags : Cobol_typeck.Diagnostics.t;}and checked_doc = Cobol_typeck.Outputs.tand rewinder =
(Cobol_ptree.compilation_group, Cobol_common.Behaviors.eidetic)
Cobol_parser.rewinderRaised by Document.checked.
exception Internal_error of document * exn * Stdlib.Printexc.raw_backtraceRaised by Document.load and Document.update; allows keeping consistent document contents.
Persistent representation of LSP-specific data (for caching). The analysis results are cached separately, as a Superbol_project.Analysis.for_lsp, so that they can be shared with other front-ends.
include module type of Superbol_project.Config.TYPEStype config = {mutable cobol_config : Cobol_config.t;mutable dialect_name : string;Builtin GnuCOBOL dialect name, or the name of a configuration file.
*)mutable source_format : Cobol_config.source_format_spec;mutable source_format_by_extension : (string * Cobol_config.source_format_spec)
list;mutable libpath : path list;mutable libexts : string list;mutable indent_config : (string * int) list;mutable exclude_dirs : string list;See excludes_dir.
mutable mf_comment : bool;mutable source_encoding : Cobol_common.Text_encoding.t option;Encoding that source files read from disk are decoded with (see Project.decode_source). Not saved in the configuration file: the LSP server sets it according to the settings of its client.
toml_handle : Ezr_toml.toml_handle;}include module type of Superbol_project.TYPEStype project = {rootdir : rootdir;config : Superbol_project__.Project_config.TYPES.config;config_filename : string;}type layout = {project_config_filename : string;Name of the TOML file that is to be found at the root of each project's directory tree.
*)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.
rootdir_fallback_policy : rootdir_fallback_policy;Policy to determine the root directory of projects based on individual filenames.
*)}type settings_reporter = {report_dialect_diags : dialect_name:string ->
dialect_file:string option ->
project ->
Cobol_common.Diagnostics.Set.t ->
unit;Diagnostics about loading the configuration of dialect dialect_name for a project, from dialect_file if any
report_config_error : Superbol_project.Diagnostics.error -> unit;report_invalid_setting : key:string -> string -> unit;}How problems met while applying client settings are reported.