refactor: updated nushell configuration

This commit is contained in:
Ceferino Patino 2025-08-15 15:31:00 -05:00
commit 838a1f8fcf
No known key found for this signature in database
2 changed files with 28 additions and 3 deletions

View file

@ -1,5 +1,25 @@
$env.config = {
buffer_editor: "nvim"
edit_mode: "vi"
show_banner: false
buffer_editor: "nvim"
edit_mode: "vi"
show_banner: false
hooks: {
pre_prompt: [{ ||
if (which direnv | is-empty) {
return
}
direnv export json | from json | default {} | load-env
if 'ENV_CONVERSIONS' in $env and 'PATH' in $env.ENV_CONVERSIONS {
$env.PATH = do $env.ENV_CONVERSIONS.PATH.from_string $env.PATH
}
}]
}
}
mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
source ~/.zoxide.nu
source ~/.cache/carapace/init.nu

5
.config/nushell/env.nu Normal file
View file

@ -0,0 +1,5 @@
zoxide init --cmd cd nushell | save -f ~/.zoxide.nu
$env.CARAPACE_BRIDGES = 'zsh,fish,bash,inshellisense' # optional
mkdir ~/.cache/carapace
carapace _carapace nushell | save --force ~/.cache/carapace/init.nu