This repository has been archived on 2026-11-02. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dotfiles/config/nushell/config.nu
T
2026-07-30 10:46:24 +02:00

155 lines
3.2 KiB
Nu

#-----------------
# History Settings
#-----------------
$env.config.history.file_format = "sqlite"
$env.config.history.max_size = 5_000_000
#-----------------------
# Miscellaneous Settings
#-----------------------
$env.config.show_banner = false
#-----------------------------
# Command Line Editor Settings
#-----------------------------
$env.config.edit_mode = "vi"
$env.config.buffer_editor = "nvim"
$env.config.cursor_shape.vi_insert = "line"
$env.config.cursor_shape.vi_normal = "block"
#---------------------
# Completions Settings
#---------------------
$env.config.completions.algorithm = "fuzzy"
$env.config.completions.sort = "smart"
$env.config.completions.partial = true
$env.config.completions.use_ls_colors = true
#---------------------
# External Completions
#---------------------
$env.config.completions.external.enable = true
$env.config.completions.external.max_results = 50
#------------------
# Terminal Settings
#------------------
$env.config.use_kitty_protocol = true
#----------------
# Datetime Format
#----------------
$env.config.datetime_format.table = "%d-%m-%Y %H:%M:%S"
$env.config.datetime_format.normal = "%d-%m-%Y %H:%M:%S"
#-----------------
# Filesize Display
#-----------------
$env.config.filesize.unit = "metric"
#------------
# Alias setup
#------------
alias ll = ls -l
alias la = ls -la
alias lm = ls -l | sort-by modified
alias lsd = ls -l | where type == dir
alias lg = lazygit
alias cocker = docker compose
alias ff = fastfetch
alias lj = lazyjj
alias vi = nvim
alias vim = nvim
alias v = nvim
alias vd = chezmoi edit # edit dotfiles
alias t = task
alias ag = ast-grep
alias zdev = zellij --layout yazineo
alias zterm = zellij --layout terminal
if ( which task | is-empty ) {
alias task = go tool task
}
if ($nu.os-info.name == 'macos') {
alias tailscale = /Applications/Tailscale.app/Contents/MacOS/Tailscale
}
#----------------------
# Environment Variables
#----------------------
$env.GCM_CREDENTIAL_STORE = "gpg"
let gpg_tty = (tty | complete)
if $gpg_tty.exit_code == 0 {
$env.GPG_TTY = ($gpg_tty.stdout | str trim)
}
$env.EDITOR = "nvim"
#----------------------
# External Dependencies
#----------------------
source $"($nu.cache-dir)/starship.nu"
source $"($nu.cache-dir)/carapace.nu"
source $"($nu.cache-dir)/zoxide.nu"
source $"($nu.cache-dir)/atuin.nu"
source $"($nu.cache-dir)/mise.nu"
#--------
# Scripts
# -------
source autoload/secrets.nu
overlay use scripts/git/mod.nu
overlay use scripts/alias-finder.nu
source scripts/commands.nu
source ~/.local/share/nushell/vendor/autoload/wt.nu
#----------------
# Custom Commands
#----------------
def reload-shell [] { exec nu }
alias f = pay-respects
alias cd = z
#----------------
# Keybindings
#----------------
$env.config.keybindings = (
$env.config.keybindings? | default [] | append [
{
name: television
modifier: control
keycode: char_t
mode: [emacs, vi_insert, vi_normal]
event: {
send: executehostcommand
cmd: "commandline edit --insert (tv | str trim)"
}
}
]
)
# Load machine-local config if it exists
source "~/.local.nu"
#--------
# Startup
#--------
fastfetch