mirror of
https://github.com/starship/starship.git
synced 2026-06-24 02:01:36 +07:00
feat(config): allow printing default and computed config (#2521)
* feat: allow printing default and computed config * fix custom modules * actually fix custom modules
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
use crate::config::ModuleConfig;
|
||||
use indexmap::IndexMap;
|
||||
use serde::{self, Serialize};
|
||||
use starship_module_config_derive::ModuleConfig;
|
||||
|
||||
pub mod aws;
|
||||
pub mod battery;
|
||||
pub mod character;
|
||||
@@ -57,3 +62,65 @@ pub mod vcsh;
|
||||
pub mod zig;
|
||||
|
||||
pub use starship_root::*;
|
||||
|
||||
#[derive(Default, Serialize, ModuleConfig, Clone)]
|
||||
#[serde(default)]
|
||||
pub struct FullConfig<'a> {
|
||||
#[serde(flatten)]
|
||||
root: starship_root::StarshipRootConfig<'a>,
|
||||
aws: aws::AwsConfig<'a>,
|
||||
battery: battery::BatteryDisplayConfig<'a>,
|
||||
character: character::CharacterConfig<'a>,
|
||||
cmake: cmake::CMakeConfig<'a>,
|
||||
cmd_duration: cmd_duration::CmdDurationConfig<'a>,
|
||||
conda: conda::CondaConfig<'a>,
|
||||
crystal: crystal::CrystalConfig<'a>,
|
||||
dart: dart::DartConfig<'a>,
|
||||
directory: directory::DirectoryConfig<'a>,
|
||||
docker_context: docker_context::DockerContextConfig<'a>,
|
||||
dotnet: dotnet::DotnetConfig<'a>,
|
||||
elixir: elixir::ElixirConfig<'a>,
|
||||
elm: elm::ElmConfig<'a>,
|
||||
env_var: env_var::EnvVarConfig<'a>,
|
||||
erlang: erlang::ErlangConfig<'a>,
|
||||
gcloud: gcloud::GcloudConfig<'a>,
|
||||
git_branch: git_branch::GitBranchConfig<'a>,
|
||||
git_commit: git_commit::GitCommitConfig<'a>,
|
||||
git_state: git_state::GitStateConfig<'a>,
|
||||
git_status: git_status::GitStatusConfig<'a>,
|
||||
go: go::GoConfig<'a>,
|
||||
helm: helm::HelmConfig<'a>,
|
||||
hg_branch: hg_branch::HgBranchConfig<'a>,
|
||||
hostname: hostname::HostnameConfig<'a>,
|
||||
java: java::JavaConfig<'a>,
|
||||
jobs: jobs::JobsConfig<'a>,
|
||||
julia: julia::JuliaConfig<'a>,
|
||||
kotlin: kotlin::KotlinConfig<'a>,
|
||||
kubernetes: kubernetes::KubernetesConfig<'a>,
|
||||
lua: lua::LuaConfig<'a>,
|
||||
memory_usage: memory_usage::MemoryConfig<'a>,
|
||||
nim: nim::NimConfig<'a>,
|
||||
nix_shell: nix_shell::NixShellConfig<'a>,
|
||||
nodejs: nodejs::NodejsConfig<'a>,
|
||||
ocaml: ocaml::OCamlConfig<'a>,
|
||||
openstack: openstack::OspConfig<'a>,
|
||||
package: package::PackageConfig<'a>,
|
||||
perl: perl::PerlConfig<'a>,
|
||||
php: php::PhpConfig<'a>,
|
||||
purescript: purescript::PureScriptConfig<'a>,
|
||||
python: python::PythonConfig<'a>,
|
||||
ruby: ruby::RubyConfig<'a>,
|
||||
rust: rust::RustConfig<'a>,
|
||||
scala: scala::ScalaConfig<'a>,
|
||||
shell: shell::ShellConfig<'a>,
|
||||
shlvl: shlvl::ShLvlConfig<'a>,
|
||||
singularity: singularity::SingularityConfig<'a>,
|
||||
status: status::StatusConfig<'a>,
|
||||
swift: swift::SwiftConfig<'a>,
|
||||
terraform: terraform::TerraformConfig<'a>,
|
||||
time: time::TimeConfig<'a>,
|
||||
username: username::UsernameConfig<'a>,
|
||||
vagrant: vagrant::VagrantConfig<'a>,
|
||||
zig: zig::ZigConfig<'a>,
|
||||
custom: IndexMap<String, custom::CustomConfig<'a>>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user