Remove most of the old cruft that was left over from nushell version 0.87 - we are now on version 0.102! Many of the old options are actually not helpful anymore so let's just get rid of them entirely (never configured the shell for me too much). Also there was a lot of 'default' commented code which made it harder to keep an overview rather than help. For now just set up a minimal shell experience with vi editing mode, and the trifecta of startship prompt, zoxide movement and atuin history enabled.
63 lines
1.9 KiB
Text
63 lines
1.9 KiB
Text
# config.nu
|
|
#
|
|
# Installed by:
|
|
# version = "0.102.0"
|
|
#
|
|
# This file is used to override default Nushell settings, define
|
|
# (or import) custom commands, or run any other startup tasks.
|
|
# See https://www.nushell.sh/book/configuration.html
|
|
#
|
|
# This file is loaded after env.nu and before login.nu
|
|
#
|
|
$env.config.show_banner = true # TODO: FOR TESTING PURPOSES
|
|
|
|
$env.config.edit_mode = "vi"
|
|
$env.config.buffer_editor = "nvim"
|
|
|
|
$env.PROMPT_INDICATOR = ""
|
|
$env.PROMPT_MULTILINE_INDICATOR = "::: "
|
|
|
|
# FIXME: Disabled for now to use starship prompts instead
|
|
# but still very buggy. See:
|
|
# https://github.com/starship/starship/issues/5423 and
|
|
# https://github.com/nushell/nushell/issues/14650
|
|
# $env.PROMPT_INDICATOR_VI_INSERT = ": "
|
|
# $env.PROMPT_INDICATOR_VI_NORMAL = "〉"
|
|
$env.PROMPT_INDICATOR_VI_INSERT = ""
|
|
$env.PROMPT_INDICATOR_VI_NORMAL = ""
|
|
# Temporary workaround
|
|
$env.config.cursor_shape.vi_insert = "line"
|
|
$env.config.cursor_shape.vi_normal = "block"
|
|
# TODO: Currently recommended starship install. Change when it changes.
|
|
mkdir ($nu.data-dir | path join "vendor/autoload")
|
|
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
|
|
# load atuin history
|
|
atuin init nu | save -f ($nu.data-dir | path join "vendor/autoload/atuin.nu")
|
|
# load zoxide bookmarks
|
|
zoxide init nushell | save -f ($nu.data-dir | path join "vendor/autoload/zoxide.nu")
|
|
|
|
# keybinds
|
|
$env.config.keybindings = [
|
|
{ modifier: control keycode: char_o mode: [emacs, vi_normal, vi_insert] event: null },
|
|
{
|
|
name: clear_screen
|
|
modifier: control
|
|
keycode: char_t
|
|
mode: ["emacs", "vi_normal", "vi_insert"]
|
|
event: {
|
|
send: ClearScreen
|
|
}
|
|
}
|
|
{
|
|
name: open_editor
|
|
modifier: control
|
|
keycode: char_e
|
|
mode: ["emacs", "vi_normal", "vi_insert"]
|
|
event: {
|
|
send: OpenEditor
|
|
}
|
|
}
|
|
]
|
|
|
|
alias l = ls
|
|
alias cl = clear
|