2021-03-15 10:40:52 +00:00
|
|
|
use crate::config::ModuleConfig;
|
2020-10-27 18:05:20 +00:00
|
|
|
|
|
|
|
use starship_module_config_derive::ModuleConfig;
|
|
|
|
|
|
|
|
#[derive(Clone, ModuleConfig)]
|
|
|
|
pub struct LuaConfig<'a> {
|
|
|
|
pub format: &'a str,
|
|
|
|
pub symbol: &'a str,
|
|
|
|
pub style: &'a str,
|
|
|
|
pub lua_binary: &'a str,
|
|
|
|
pub disabled: bool,
|
2021-02-17 18:03:09 +00:00
|
|
|
pub detect_extensions: Vec<&'a str>,
|
|
|
|
pub detect_files: Vec<&'a str>,
|
|
|
|
pub detect_folders: Vec<&'a str>,
|
2020-10-27 18:05:20 +00:00
|
|
|
}
|
|
|
|
|
2021-03-15 10:40:52 +00:00
|
|
|
impl<'a> Default for LuaConfig<'a> {
|
|
|
|
fn default() -> Self {
|
2020-10-27 18:05:20 +00:00
|
|
|
LuaConfig {
|
2021-01-21 22:00:12 +00:00
|
|
|
format: "via [$symbol($version )]($style)",
|
2020-10-27 18:05:20 +00:00
|
|
|
symbol: "🌙 ",
|
|
|
|
style: "bold blue",
|
|
|
|
lua_binary: "lua",
|
|
|
|
disabled: false,
|
2021-02-17 18:03:09 +00:00
|
|
|
detect_extensions: vec!["lua"],
|
|
|
|
detect_files: vec![".lua-version"],
|
|
|
|
detect_folders: vec!["lua"],
|
2020-10-27 18:05:20 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|