mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-06-11 04:42:20 +00:00
3014284e95
* feat/add readme + presets * feat/add spack module * feat/add spack config * feat/spack to handle * feat/add spack to modules and root * fix/readme formattign * fix/readme typo * fix/readme formatting * feat/replace module_config_derive with serde * feat/add macros to generate schema + schema
25 lines
618 B
Rust
25 lines
618 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Clone, Deserialize, Serialize)]
|
|
#[cfg_attr(feature = "config-schema", derive(schemars::JsonSchema))]
|
|
#[serde(default)]
|
|
pub struct SpackConfig<'a> {
|
|
pub truncation_length: usize,
|
|
pub format: &'a str,
|
|
pub symbol: &'a str,
|
|
pub style: &'a str,
|
|
pub disabled: bool,
|
|
}
|
|
|
|
impl<'a> Default for SpackConfig<'a> {
|
|
fn default() -> Self {
|
|
SpackConfig {
|
|
truncation_length: 1,
|
|
format: "via [$symbol$environment]($style) ",
|
|
symbol: "🅢 ",
|
|
style: "blue bold",
|
|
disabled: false,
|
|
}
|
|
}
|
|
}
|