β starship Configuration
starship configuration uses TOML format in ~/.config/starship.toml. The file is reloaded automatically when saved.
Basic Configuration
# Don't print a new line at the start of the prompt
add_newline = false
# Replace the "β―" symbol in the prompt with "β"
[character]
success_symbol = "[β](bold green)"
# Disable the package module
[package]
disabled = true
Prompt Format
Control the overall prompt structure:
format = """
$directory$git_branch$git_status
$nodejs$python$rust$golang
$character
"""
Right Prompt
Enable a right-side prompt:
right_format = "$time"
Character Module
Customize the prompt character:
[character]
success_symbol = "[β](bold green)"
error_symbol = "[β](bold red)"
vicmd_symbol = "[V](bold green)"
Directory Module
Customize directory display:
[directory]
truncation_length = 3
truncate_to_repo = true
fish_style_pwd_dir_length = 1
Git Configuration
[git_branch]
symbol = "π± "
truncation_length = 20
only_attached = true
[git_status]
conflicted = "π³"
ahead = "ππ¨"
behind = "π°"
diverged = "π΅"
untracked = "π€·"
stashed = "π¦"
modified = "π"
staged = "ποΈ"
renamed = "π"
deleted = "ποΈ"
Language Modules
Node.js
[nodejs]
symbol = "β¬’ "
detect_files = ["package.json", ".node-version"]
detect_folders = ["node_modules"]
Python
[python]
symbol = "π "
pyenv_version_name = true
detect_files = ["requirements.txt", ".python-version", "pyproject.toml"]
Rust
[rust]
symbol = "π¦ "
detect_files = ["Cargo.toml"]
Go
[golang]
symbol = "πΉ "
detect_files = ["go.mod", "go.sum"]
Performance Options
# Timeout for scanning files (milliseconds)
scan_timeout = 30
# Timeout for command execution (milliseconds)
command_timeout = 500
# Follow symlinks when checking directories
follow_symlinks = true
Custom Presets
Apply built-in presets:
starship preset gruvbox-rainbow -o ~/.config/starship.toml
starship preset pastel-powerline -o ~/.config/starship.toml
starship preset nerd-font -o ~/.config/starship.toml
starship preset no-nerd-font -o ~/.config/starship.toml
Full Example Configuration
add_newline = false
[character]
success_symbol = "[β](bold green)"
error_symbol = "[β](bold red)"
[directory]
truncation_length = 3
truncate_to_repo = true
[git_branch]
symbol = "π± "
[git_status]
conflicted = "π³"
ahead = "ππ¨"
behind = "π°"
diverged = "π΅"
untracked = "π€·"
[nodejs]
symbol = "β¬’ "
[python]
symbol = "π "
[rust]
symbol = "π¦ "
[time]
disabled = false
format = "π [$time](bold blue) "
time_format = "%T"
Configuration is simple yet powerful, allowing extensive customization while maintaining starship's speed and simplicity.
For module-specific configuration, see starship Modules. For the main starship overview, see starship.
- Links to
- starship Β· starship Modules Β· starship
- Linked from
- starship Modules Β· starship