mirror of
https://github.com/starship/starship.git
synced 2026-06-24 02:01:36 +07:00
feat: allow printing config file schema (#3737)
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Clone, Serialize, Deserialize, Debug)]
|
||||
#[cfg_attr(feature = "config-schema", derive(schemars::JsonSchema))]
|
||||
#[serde(default)]
|
||||
pub struct StarshipRootConfig {
|
||||
#[serde(rename = "$schema")]
|
||||
schema: String,
|
||||
pub format: String,
|
||||
pub right_format: String,
|
||||
pub continuation_prompt: String,
|
||||
@@ -96,6 +99,7 @@ pub const PROMPT_ORDER: &[&str] = &[
|
||||
impl<'a> Default for StarshipRootConfig {
|
||||
fn default() -> Self {
|
||||
StarshipRootConfig {
|
||||
schema: "https://starship.rs/config-schema.json".to_string(),
|
||||
format: "$all".to_string(),
|
||||
right_format: "".to_string(),
|
||||
continuation_prompt: "[∙](bright-black) ".to_string(),
|
||||
|
||||
Reference in New Issue
Block a user