Superbol_project.Configmodule TYPES : sig ... endinclude module type of TYPES
with type path = TYPES.path
and type config = TYPES.configtype config = TYPES.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;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;}type t = configval new_default : unit -> tDefault value of the exclude-dirs setting (see excludes_dir).
val load_file :
platform:Cobol_common.Platform.TYPES.platform ->
?verbose:bool ->
string ->
t Cobol_common.Diagnostics.with_diagsload_file ~verbose config_filename loads the given project configuration file. Raises ERROR or Sys_error in case of failure.
val save : ?verbose:bool -> config_filename:string -> t -> unitval reload :
platform:Cobol_common.Platform.TYPES.platform ->
?verbose:bool ->
config_filename:string ->
t ->
bool Cobol_common.Diagnostics.with_diagsreload ~verbose ~config_filename config returns true, possibly along diagnostics, if the reloaded configuration has changed.
val source_format_for : filename:string -> t -> Cobol_config.source_format_specsource_format_for ~filename config returns the source format for the given file, checking per-extension overrides before falling back to the global source format.
val excludes_dir : relative_path:string -> t -> boolexcludes_dir ~relative_path config indicates whether the exclude-dirs setting of config excludes the directory relative_path (relative to the project root, with '/' as separator) from project-wide operations, such as looking for source files.
Entries that hold a '/' are paths relative to the project root; others are directory names, that match at any depth. Leading "./" and trailing '/' are ignored.
val copybook_lookup_config_for :
filename:string ->
t ->
Cobol_common.Copybook.TYPES.lookup_configcopybook_lookup_config_for ~filename project constructs a copybook lookup configuration (that notably indicates directory names where copybooks are looked up) for a given source file name, in a project with the given configuration.
Those may also raise ERROR
val cobol_config_from_dialect_name :
platform:Cobol_common.Platform.TYPES.platform ->
verbose:bool ->
string ->
Cobol_config.t Cobol_common.Diagnostics.with_diagsval cobol_source_format : string -> Cobol_config.source_format_specval of_cache :
platform:Cobol_common.Platform.TYPES.platform ->
config_filename:string ->
cached ->
t