summaryrefslogtreecommitdiffstats
path: root/src/configs/rust.rs
diff options
context:
space:
mode:
authorMatan Kushner <hello@matchai.me>2019-10-04 22:30:46 +0900
committerGitHub <noreply@github.com>2019-10-04 22:30:46 +0900
commit05210b9510b797f7738d5b2d51e8a6877f2d5283 (patch)
tree7399401dba9373f61035dbbd055f4137cd20f705 /src/configs/rust.rs
parente90a3768da7882db092b38d141cf8e19fabbee56 (diff)
refactor: Go from Rust workspaces to a package with nested packages (#480)
Diffstat (limited to 'src/configs/rust.rs')
-rw-r--r--src/configs/rust.rs29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/configs/rust.rs b/src/configs/rust.rs
new file mode 100644
index 000000000..2bd257588
--- /dev/null
+++ b/src/configs/rust.rs
@@ -0,0 +1,29 @@
+use crate::config::{ModuleConfig, RootModuleConfig, SegmentConfig};
+
+use ansi_term::{Color, Style};
+use starship_module_config_derive::ModuleConfig;
+
+#[derive(Clone, ModuleConfig)]
+pub struct RustConfig<'a> {
+ pub symbol: SegmentConfig<'a>,
+ pub version: SegmentConfig<'a>,
+ pub style: Style,
+ pub disabled: bool,
+}
+
+impl<'a> RootModuleConfig<'a> for RustConfig<'a> {
+ fn new() -> Self {
+ RustConfig {
+ symbol: SegmentConfig {
+ value: "🦀 ",
+ style: None,
+ },
+ version: SegmentConfig {
+ value: "",
+ style: None,
+ },
+ style: Color::Red.bold(),
+ disabled: false,
+ }
+ }
+}