Starship Config
Starship
“The minimal, blazing-fast, and infinitely customizable prompt for any shell!”. I love this program. It creates great prompts for me to be able to create a truly unique to me experience that I really enjoy!
The schema
This will allow you to get some vscode auto completions. I dont know how to get this to do the thing with neovim.
"$schema" = 'https://starship.rs/config-schema.json'
Now for the format
Now I want to try a two line layout to be honest.
format = '''
$os$directory$git_branch$git_commit
$rust$python$lua$golang$gleam$dotnet$bun$character '''
The Colorscheme
Colors
Basically I want to be able to use my vaporlush theme that I really love! So just getting the lua code from my code editor:
--- @type Vaporlush.Palette
VaporPalette = {
bg = '#0e102d',
fg = '#079ef0',
bg_highlight = '#0a2846',
fg_highlight = '#5885ed',
comment = '#8da0b8',
primary0 = '#0700de',
primary1 = '#0b03fc',
primary2 = '#352ff5',
primary3 = '#4e47ff',
secondary0 = '#b50465',
secondary1 = '#e60580',
secondary2 = '#fa34a1',
secondary3 = '#fc65b8',
tertiary0 = '#3f10cc',
tertiary1 = '#6439e6',
tertiary2 = '#8864f5',
tertiary3 = '#af95fc',
quartary0 = '#fc5e03',
quartary1 = '#fc853f',
quartary2 = '#f59b67',
quartary3 = '#ffb68c',
gitsigns = {
info = '#006655',
add = '#00ccaa',
change = '#e3307a',
danger = '#c71e26'
}
}
return VaporPalette
I think that it is very simple to convert to a starship config.
palette = 'vaporlush'
[palettes.vaporlush]
bg = '#0e102d'
fg = '#079ef0'
bg_highlight = '#0a2846'
fg_highlight = '#5885ed'
comment = '#8da0b8'
primary0 = '#0700de'
primary1 = '#0b03fc'
primary2 = '#352ff5'
primary3 = '#4e47ff'
secondary0 = '#b50465'
secondary1 = '#e60580'
secondary2 = '#fa34a1'
secondary3 = '#fc65b8'
tertiary0 = '#3f10cc'
tertiary1 = '#6439e6'
tertiary2 = '#8864f5'
tertiary3 = '#af95fc'
quartary0 = '#fc5e03'
quartary1 = '#fc853f'
quartary2 = '#f59b67'
quartary3 = '#ffb68c'
Now it is a simple matter of just activating the palette
Modules
Bun
The bun module shows the currently installed version of the bun JavaScript runtime. By default the module will be shown if any of the following conditions are met:
- The current directory contains a bun.lock file
- The current directory contains a bun.lockb file
- The current directory contains a bunfig.toml file
Code
[bun]
symbol = ' '
style = 'bold bg:#aaaacc fg:bg_highlight'
format = '[ $symbol $version ]($style)'
Character
[character] # The name of the module we are configuring is 'character'
success_symbol = '[>>=](bold quartary3)'
error_symbol = '[>>=](bold quartary0)'
Docker Context
The docker_context module shows the currently active Docker context if it’s not set to default or desktop-linux, or if the
- DOCKER_MACHINE_NAME,
- DOCKER_HOST
- DOCKER_CONTEXT environment variables are set (as they are meant to override the context in use).
[docker_context]
symbol = ' '
style = 'bold primary1'
format = '[ $symbol $version ]($style)'
Dotnet
[dotnet]
symbol = ' '
style = 'bold primary3'
heuristic = false
format = '[ $symbol $version ]($style)'
Git Branch
The git_branch module shows the active branch of the repo in your current directory.
[git_branch]
symbol = ' '
truncation_length = 8
truncation_symbol = ''
ignore_branches = ['master', 'main']
Git Commit
The git_commit module shows the current commit hash and also the tag (if any) of the repo in your current directory.
[git_commit]
commit_hash_length = 4
tag_symbol = ' '
Gleam
The gleam module shows the currently installed version of Gleam. By default the module will be shown if any of the following conditions are met:
- The current directory contains a gleam.toml file
- The current directory contains a file with the .gleam extension
[gleam]
symbol = ' '
style = 'bold tertiary1'
format = '[ $symbol $version ]($style)'
Go
The golang module shows the currently installed version of Go. By default the module will be shown if any of the following conditions are met:
- The current directory contains a go.mod file
- The current directory contains a go.sum file
- The current directory contains a go.work file
- The current directory contains a glide.yaml file
- The current directory contains a Gopkg.yml file
- The current directory contains a Gopkg.lock file
- The current directory contains a .go-version file
- The current directory contains a Godeps directory
- The current directory contains a file with the .go extension
[golang]
symbol = ''
style = 'bold primary3'
format = '[ $symbol $version ]($style)'
Lua
The lua module shows the currently installed version of Lua. By default the module will be shown if any of the following conditions are met:
- The current directory contains a .lua-version file
- The current directory contains a lua directory
- The current directory contains a file with the .lua extension
[lua]
symbol = ' '
style = 'bold primary0'
format = '[ $symbol $version ]($style)'
Node
[nodejs]
symbol = ' '
style = 'bold #00ccaa'
format = '[ $symbol $version ]($style)'
OS
The os module shows the current operating system. OS information is detected via the os_info crate. Also in here I add custom symbols for some of the os symbols as well.
[os]
disabled = false
style = "tertiary3"
[os.symbols]
Ubuntu = " "
Arch = " "
Windows = " "
Macos = " "
Rust
By default the rust module shows the currently installed version of Rust. The module will be shown if any of the following conditions are met:
- The current directory contains a Cargo.toml file
- The current directory contains a file with the .rs extension
[rust]
symbol = ' '
style = 'bold #c71e26'
format = '[ $symbol $version ]($style)'
Python
The python module shows the currently installed version of Python and the current Python virtual environment if one is activated. If pyenv_version_name is set to true, it will display the pyenv version name. Otherwise, it will display the version number from python –version. By default, the module will be shown if any of the following conditions are met:
- The current directory contains a .python-version file
- The current directory contains a Pipfile file
- The current directory contains a init.py file
- The current directory contains a pyproject.toml file
- The current directory contains a requirements.txt file
- The current directory contains a setup.py file
- The current directory contains a tox.ini file
- The current directory contains a pixi.toml file
- The current directory contains a file with the .py extension.
- The current directory contains a file with the .ipynb extension.
- A virtual environment is currently activated
[python]
symbol = ' '
pyenv_version_name = true
style = 'bold quartary1'
format = '[ $symbol $version ]($style)'