Make ur `Config` in **multiple file** with `json`, `yaml`, `toml` and *More* **All at Once** and **Hot Reload** on **Change**
npm install config-many
Config in multiple file with json, yaml and toml All at Once and Hot Reload on Change.
. like .main.toml,
.main.toml
toml
"$schema" = 'https://starship.rs/config-schema.json'
format = """
${env_var.CSI}1F\
${env_var.CSI}$character╭─$os$username$directory${env_var.nim}[$package${custom.node}${custom.pnpm}${custom.npm}]()
${env_var.CSI}$character╰ \
${env_var.CSI}0m"""
add_newline = true
continuation_prompt = "| "
fill = { symbol = " " }
`
file-1.json
`json
{
"$schema" : "https://starship.rs/config-schema.json",
"env_var": {
"CSI": {
"variable": "CSI",
"format": "$env_value",
"disabled": false
},
"nim": {
"variable": "nim_ver",
"format": "with $symbol$env_value ",
"style": "bright-cyan bold",
"symbol": " ",
"disabled": true
}
}
}
`
file-2.yml
`yaml
yaml-language-server: $schema=../schema.json
aws:
disabled: false
expiration_symbol: X
force_display: false
format: on [$symbol($profile )(\($region\) )(\[$duration\] )]($style)
style: bold yellow
os:
format: "$symbol"
style: "bold bright-Blue"
disabled: false
symbols:
Windows: " "
Kali: " "
`
---
output: starship.toml
`toml
"$schema" = 'https://starship.rs/config-schema.json'
From: .frontend.toml
format = """
$fill[${custom.get-clock-time}${custom.git-branch}${custom.is-git}\r
${env_var.CSI}1F${env_var.CSI}100000C${env_var.CSI}2D${custom.git-url}${env_var.CSI}10C](fg:237)\r
${env_var.CSI}1F${env_var.CSI}$character╭─$os$username$directory${env_var.nim}[$package${custom.node}${custom.pnpm}${custom.npm}]()\r
${env_var.CSI}$character╰ ${env_var.CSI}0m"""
add_newline = true
continuation_prompt = "| "
[fill]
symbol = " "
From: env_var.json
[env_var.CSI]
variable = "CSI"
format = "$env_value"
disabled = false
[env_var.nim]
variable = "nim_ver"
format = "with $symbol$env_value "
style = "bright-cyan bold"
symbol = " "
disabled = true
From: example.yaml
[aws]
disabled = false
expiration_symbol = "X"
force_display = false
format = "on [$symbol($profile )(\\($region\\) )(\\[$duration\\] )]($style)"
style = "bold yellow"
[os]
format = "$symbol"
style = "bold bright-Blue"
disabled = false
[os.symbols]
Windows = " "
Kali = " "
``