summaryrefslogtreecommitdiffstats
path: root/src/configs
diff options
context:
space:
mode:
authorShu Kutsuzawa <cappyzawa@gmail.com>2021-02-22 03:50:40 +0900
committerGitHub <noreply@github.com>2021-02-21 19:50:40 +0100
commite73581ddf00207fa0b17a07b43ac0f7785eb1811 (patch)
tree80691127184be8d90bafd20f9544ac915d001f3f /src/configs
parent509767adc02c39f206e7f0df15920ddba1b2444e (diff)
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.
Diffstat (limited to 'src/configs')
-rw-r--r--src/configs/ocaml.rs6
1 files changed, 6 insertions, 0 deletions
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"],
}
}
}