Module Merlin_kernel.Mconfig

OCaml commandline parsing

type ocaml = {
  1. include_dirs : string list;
  2. hidden_dirs : string list;
  3. no_std_include : bool;
  4. unsafe : bool;
  5. classic : bool;
  6. principal : bool;
  7. real_paths : bool;
  8. threads : [ `None | `Threads | `Vmthreads ];
  9. recursive_types : bool;
  10. strict_sequence : bool;
  11. applicative_functors : bool;
  12. nopervasives : bool;
  13. strict_formats : bool;
  14. open_modules : string list;
  15. ppx : string Merlin_utils.Std.with_workdir list;
  16. pp : string Merlin_utils.Std.with_workdir option;
  17. warnings : Ocaml_utils.Warnings.state;
  18. cmi_file : string option;
  19. parameters : string list;
  20. as_parameter : bool;
  21. as_argument_for : string option;
  22. zero_alloc_check : Ocaml_utils.Zero_alloc_annotations.Check.t;
  23. zero_alloc_assert : Ocaml_utils.Zero_alloc_annotations.Assert.t;
  24. infer_with_bounds : bool;
}
val dump_ocaml : ocaml -> Merlin_utils.Std.json

Merlin high-level settings

type merlin = {
  1. build_path : string list;
  2. source_path : string list;
  3. hidden_build_path : string list;
  4. hidden_source_path : string list;
  5. cmi_path : string list;
  6. cmt_path : string list;
  7. index_files : string list;
  8. extensions : string list;
  9. suffixes : (string * string) list;
  10. stdlib : string option;
  11. source_root : string option;
  12. unit_name : string option;
  13. unit_name_for : string Merlin_utils.Std.String.Map.t;
  14. wrapping_prefix : string option;
  15. reader : string list;
  16. protocol : [ `Json | `Sexp ];
  17. log_file : string option;
  18. log_sections : string list;
  19. config_path : string option;
  20. use_ppx_cache : bool;
  21. exclude_query_dir : bool;
  22. flags_to_apply : string list Merlin_utils.Std.with_workdir list;
  23. flags_applied : string list Merlin_utils.Std.with_workdir list;
  24. failures : string list;
  25. extension_to_reader : (string * string) list;
  26. cache_lifespan : int;
}
val dump_merlin : merlin -> Merlin_utils.Std.json

Some flags affecting queries

module Verbosity : sig ... end
type query = {
  1. filename : string;
  2. directory : string;
  3. printer_width : int;
  4. verbosity : Verbosity.t;
}

Main configuration

type t = {
  1. ocaml : ocaml;
  2. merlin : merlin;
  3. query : query;
}
val initial : t
val dump : t -> Merlin_utils.Std.json
val merge_merlin_config : Mconfig_dot.config -> merlin -> failures:string list -> config_path:string -> merlin
val get_external_config : string -> t -> t
val normalize : t -> t
val is_normalized : t -> bool
val parse_arguments : wd:string -> warning:(string -> unit) -> 'a Merlin_utils.Marg.spec list -> string list -> t -> 'a -> t * 'a
val flags_for_completion : unit -> string list
val document_arguments : out_channel -> unit

Computing project paths

val source_path : t -> string list
val hidden_source_path : t -> string list
val build_path : t -> string list
val hidden_build_path : t -> string list
val cmt_path : t -> string list
val global_modules : ?include_current:bool -> t -> string list

Accessors for other information

val filename : t -> string
val unitname : t -> string