● starship Configuration

493 2026-08-14 note β™‘οΈŽ

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.