summaryrefslogtreecommitdiffstats
path: root/src/configs/haskell.rs
diff options
context:
space:
mode:
authorAndrew Prokhorenkov <andrew.prokhorenkov@gmail.com>2020-01-25 00:48:39 -0600
committerKevin Song <chipbuster@users.noreply.github.com>2020-01-25 00:48:39 -0600
commit6f2c9fb397fcfb22829c043a23372afe1f877499 (patch)
tree48b64728a098dcd95f2e694b0a62dd66467fc47b /src/configs/haskell.rs
parentf4c095de92a09b7143766c4759ab0e60ff0befbb (diff)
feat: add Haskell Stack support (#546)
Add a Haskell Stack module when a stack.yaml file is detected
Diffstat (limited to 'src/configs/haskell.rs')
-rw-r--r--src/configs/haskell.rs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/configs/haskell.rs b/src/configs/haskell.rs
new file mode 100644
index 000000000..b7e29e497
--- /dev/null
+++ b/src/configs/haskell.rs
@@ -0,0 +1,23 @@
+use crate::config::{ModuleConfig, RootModuleConfig, SegmentConfig};
+
+use ansi_term::{Color, Style};
+use starship_module_config_derive::ModuleConfig;
+
+#[derive(Clone, ModuleConfig)]
+pub struct HaskellConfig<'a> {
+ pub symbol: SegmentConfig<'a>,
+ pub version: SegmentConfig<'a>,
+ pub style: Style,
+ pub disabled: bool,
+}
+
+impl<'a> RootModuleConfig<'a> for HaskellConfig<'a> {
+ fn new() -> Self {
+ HaskellConfig {
+ symbol: SegmentConfig::new("λ "),
+ version: SegmentConfig::default(),
+ style: Color::Red.bold(),
+ disabled: false,
+ }
+ }
+}