1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-16 01:57:07 +00:00
starship/src/configs/elixir.rs

30 lines
791 B
Rust
Raw Normal View History

use crate::config::ModuleConfig;
2020-03-02 03:29:27 +00:00
use serde::Serialize;
2020-03-02 03:29:27 +00:00
use starship_module_config_derive::ModuleConfig;
#[derive(Clone, ModuleConfig, Serialize)]
2020-03-02 03:29:27 +00:00
pub struct ElixirConfig<'a> {
pub format: &'a str,
pub symbol: &'a str,
pub style: &'a str,
2020-03-02 03:29:27 +00:00
pub disabled: bool,
pub detect_extensions: Vec<&'a str>,
pub detect_files: Vec<&'a str>,
pub detect_folders: Vec<&'a str>,
2020-03-02 03:29:27 +00:00
}
impl<'a> Default for ElixirConfig<'a> {
fn default() -> Self {
2020-03-02 03:29:27 +00:00
ElixirConfig {
format: "via [$symbol($version \\(OTP $otp_version\\) )]($style)",
symbol: "💧 ",
style: "bold purple",
2020-03-02 03:29:27 +00:00
disabled: false,
detect_extensions: vec![],
detect_files: vec!["mix.exs"],
detect_folders: vec![],
2020-03-02 03:29:27 +00:00
}
}
}