From 71b6fc17777bd587199a6c1b2c7e30e1a87535f7 Mon Sep 17 00:00:00 2001 From: Thomas O'Donnell Date: Sat, 20 Feb 2021 18:33:00 +0100 Subject: feat(elm): Configure when the module is shown (#2341) This makes it possible to configure when the elm 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/elm.rs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/configs/elm.rs') diff --git a/src/configs/elm.rs b/src/configs/elm.rs index 17dc35686..801622cf4 100644 --- a/src/configs/elm.rs +++ b/src/configs/elm.rs @@ -8,6 +8,9 @@ pub struct ElmConfig<'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 ElmConfig<'a> { @@ -17,6 +20,9 @@ impl<'a> RootModuleConfig<'a> for ElmConfig<'a> { symbol: "🌳 ", style: "cyan bold", disabled: false, + detect_extensions: vec!["elm"], + detect_files: vec!["elm.json", "elm-package.json", ".elm-version"], + detect_folders: vec!["elm-stuff"], } } } -- cgit v1.2.3