Superbol_projectmodule Config : sig ... endmodule Diagnostics : sig ... endmodule TYPES : sig ... endinclude module type of TYPES
with type rootdir = TYPES.rootdir
and type project = TYPES.project
and type rootdir_fallback_policy = TYPES.rootdir_fallback_policy
and type layout = TYPES.layouttype rootdir = TYPES.rootdirtype project = TYPES.project = {rootdir : rootdir;config : Superbol_project__.Project_config.TYPES.config;config_filename : string;}type layout = TYPES.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.
*)}and rootdir_fallback_policy = TYPES.rootdir_fallback_policy = type t = projectval rootdir_at : dirname:string -> rootdirrootdir_at ~dirname initializes a project into an existing directory.
Raises Invalid_argument in case dirname is not the name of an existing directory.
rootdir_for ~filename ~layout locates the project directory for a given file name. This project directory is the closest parent directory of filename that contains a file with the name layout.project_config_filename.
When no such file is found, the behavior depends on the given fallback policy: if layout.rootdir_fallback_policy = Same_as_file_directory, the name of the directory that contains filename is chosen as root for the project; alternatively, if the fallback is Given_directory dirname, directory dirname is used instead.
val for_ :
rootdir:rootdir ->
layout:layout ->
t Cobol_common.Diagnostics.TYPES.with_diagsfor_ ~rootdir ~layout retrieves a project based on its root directory.
This may trigger reading project configuration files if the project was not yet loaded. The name of the project's configuration file is determined by the layout argument.
with_default_config ~rootdir ~layout initializes a project structure with a default configuration.
val copybook_lookup_config_for :
filename:string ->
t ->
Cobol_common.Copybook.lookup_configcopybook_lookup_config_for ~uri project constructs a copybook lookup configuration for a source file with name filename, in the given project.
val detect_copybook : filename:string -> ?contents:string -> t -> booldetect_copybook ~filename project indicates whether a document with the given filename should be treated as a copybook in project.
val of_cache :
rootdir:rootdir ->
layout:layout ->
cached ->
t Cobol_common.Diagnostics.TYPES.with_diagsof_cache ~rootdir ~layout cached_project attempts to load and return a cached project. Behaves like for_ ~rootdir ~layout in case of error (outdated or missing configuration file).
val config : t -> Superbol_project__.Project_config.TYPES.configval save_config : ?verbose:bool -> t -> unitval reload_config :
?verbose:bool ->
t ->
bool Cobol_common.Diagnostics.TYPES.with_diagsreload_config ~verbose project reloads the configuration of project from its associated TOML file. Returns true when the reloaded configuration does not match with the one before the call. Prints some informative message on stderr if verbose is set.
module SET : sig ... endval string_of_rootdir : rootdir -> stringval relative_path_for : filename:string -> t -> stringval absolute_path_for : filename:string -> t -> string