From e73581ddf00207fa0b17a07b43ac0f7785eb1811 Mon Sep 17 00:00:00 2001 From: Shu Kutsuzawa Date: Mon, 22 Feb 2021 03:50:40 +0900 Subject: feat(ocaml): Configure when the module is shown (#2354) This makes it possible to configure when the ocaml module is shown based on the contents of a directory. This should make it possible to be a lot more granular when configuring the module. --- src/configs/ocaml.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/configs') diff --git a/src/configs/ocaml.rs b/src/configs/ocaml.rs index f407c6b9d..7f1dad715 100644 --- a/src/configs/ocaml.rs +++ b/src/configs/ocaml.rs @@ -8,6 +8,9 @@ pub struct OCamlConfig<'a> { pub symbol: &'a str, pub style: &'a str, pub disabled: bool, + pub detect_extensions: Vec<&'a str>, + pub detect_files: Vec<&'a str>, + pub detect_folders: Vec<&'a str>, } impl<'a> RootModuleConfig<'a> for OCamlConfig<'a> { @@ -17,6 +20,9 @@ impl<'a> RootModuleConfig<'a> for OCamlConfig<'a> { symbol: "🐫 ", style: "bold yellow", disabled: false, + detect_extensions: vec!["opam", "ml", "mli", "re", "rei"], + detect_files: vec!["dune", "dune-project", "jbuild", "jbuild-ignore", ".merlin"], + detect_folders: vec!["_opam", "esy.lock"], } } } -- cgit v1.2.3