Compare commits

..

No commits in common. "bfecbdcd59c36329c1e32caeb2811fd46cf5ccdd" and "b6e3af4593ca71681dc016015e79c44039d7dc21" have entirely different histories.

2 changed files with 9 additions and 44 deletions

View file

@ -9,17 +9,13 @@
#
# This file is loaded after env.nu and before login.nu
#
$env.config.show_banner = false
$env.config.show_banner = false # TODO: FOR TESTING PURPOSES
$env.config.edit_mode = "vi"
# Enable same behavior as fzf-tab-complete for zsh
$env.config.completions.algorithm = "fuzzy"
$env.config.buffer_editor = "nvim"
$env.PROMPT_INDICATOR = ""
$env.PROMPT_MULTILINE_INDICATOR = "::: " # overwritten by starship
# enable transient prompt with starship
$env.TRANSIENT_PROMPT_COMMAND = ^starship module character
$env.TRANSIENT_PROMPT_COMMAND_RIGHT = {|| ^starship module cmd_duration }
$env.PROMPT_MULTILINE_INDICATOR = "::: "
# FIXME: Disabled for now to use starship prompts instead
# but still very buggy. See:
@ -32,7 +28,7 @@ $env.PROMPT_INDICATOR_VI_NORMAL = ""
# Temporary workaround
$env.config.cursor_shape.vi_insert = "line"
$env.config.cursor_shape.vi_normal = "block"
# load starship prompt
# 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
@ -55,7 +51,6 @@ $env.config.keybindings = [
{send: Enter}
]
}
# reedline edits
{
name: insert_last_token
modifier: alt
@ -81,23 +76,10 @@ $env.config.keybindings = [
keycode: char_s
mode: [emacs vi_insert vi_normal]
event: {
send: ExecuteHostCommand
cmd: " let cmd = (commandline); commandline edit (if $cmd starts-with sudo { $cmd | str replace -r '^sudo ' '' } else { 'sudo ' ++ $cmd });"
send: executehostcommand
cmd: "let cmd = (commandline); commandline edit (if $cmd starts-with sudo { $cmd | str replace -r '^sudo ' '' } else { 'sudo ' ++ $cmd });"
}
}
{
name: partial_history_complete
modifier: None
keycode: char_e
mode: [vi_normal]
event: {
until: [
{ send: HistoryHintWordComplete }
{ edit: MoveWordRight }
]
}
}
# file menus
{
name: run_zoxide
modifier: alt
@ -105,7 +87,7 @@ $env.config.keybindings = [
mode: ["emacs", "vi_normal", "vi_insert"]
event: {
send: executehostcommand
cmd: " zoxide query --interactive"
cmd: "zoxide query --interactive"
}
}
{
@ -115,7 +97,7 @@ $env.config.keybindings = [
mode: [ "vi_normal"]
event: {
send: executehostcommand
cmd: " zoxide query --interactive"
cmd: "zoxide query --interactive"
}
}
{
@ -125,8 +107,7 @@ $env.config.keybindings = [
mode: ["emacs", "vi_normal", "vi_insert"]
event: {
send: executehostcommand
# intentional eol space to prevent adding cmd to history
cmd: "
cmd: "
let fzf_ctrl_t_command = \$\"fd --type file --hidden | fzf --preview 'bat --color=always --style=full --line-range=:500 {}' \";
let result = nu -l -i -c $fzf_ctrl_t_command;
commandline edit --append $result;
@ -134,17 +115,6 @@ $env.config.keybindings = [
"
}
}
# job control
{
name: unfreeze_job
modifier: control
keycode: char_z
mode: ["emacs", "vi_normal", "vi_insert"]
event: {
send: executehostcommand
cmd: "job unfreeze"
}
}
]
alias l = ls
@ -157,6 +127,3 @@ def --env mcd [path: path] {
}
alias v = nvim
# requires minimum nushell: 0.103 for job control
alias fg = job unfreeze

View file

@ -26,8 +26,6 @@ $typst\
$package
"""
continuation_prompt = "[:::](bright-black) "
[directory]
style = "blue"
fish_style_pwd_dir_length = 1