summaryrefslogtreecommitdiffstats
path: root/src/configs
diff options
context:
space:
mode:
authorDavid Knaack <davidkna@users.noreply.github.com>2021-02-21 18:01:17 +0100
committerGitHub <noreply@github.com>2021-02-21 18:01:17 +0100
commita499f30157bb231d8f39557cdf504e7c094b68aa (patch)
treeea07751f592443d1852a39e21c0b4f1bec857152 /src/configs
parent9ba82e8d921f8d0e7ff48f1f063635ca5971e49d (diff)
feat(rust): Configure when the module is shown (#2350)
This makes it possible to configure when the rust module is shown based on the contents of a directory.
Diffstat (limited to 'src/configs')
-rw-r--r--src/configs/rust.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/configs/rust.rs b/src/configs/rust.rs
index 974c5ede0..1b5657c33 100644
--- a/src/configs/rust.rs
+++ b/src/configs/rust.rs
@@ -8,6 +8,9 @@ pub struct RustConfig<'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 RustConfig<'a> {
@@ -17,6 +20,9 @@ impl<'a> RootModuleConfig<'a> for RustConfig<'a> {
symbol: "🦀 ",
style: "bold red",
disabled: false,
+ detect_extensions: vec!["rs"],
+ detect_files: vec!["Cargo.toml"],
+ detect_folders: vec![],
}
}
}