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 # 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" $env.config.edit_mode = "vi"
# Enable same behavior as fzf-tab-complete for zsh $env.config.buffer_editor = "nvim"
$env.config.completions.algorithm = "fuzzy"
$env.PROMPT_INDICATOR = "" $env.PROMPT_INDICATOR = ""
$env.PROMPT_MULTILINE_INDICATOR = "::: " # overwritten by starship $env.PROMPT_MULTILINE_INDICATOR = "::: "
# enable transient prompt with starship
$env.TRANSIENT_PROMPT_COMMAND = ^starship module character
$env.TRANSIENT_PROMPT_COMMAND_RIGHT = {|| ^starship module cmd_duration }
# FIXME: Disabled for now to use starship prompts instead # FIXME: Disabled for now to use starship prompts instead
# but still very buggy. See: # but still very buggy. See:
@ -32,7 +28,7 @@ $env.PROMPT_INDICATOR_VI_NORMAL = ""
# Temporary workaround # Temporary workaround
$env.config.cursor_shape.vi_insert = "line" $env.config.cursor_shape.vi_insert = "line"
$env.config.cursor_shape.vi_normal = "block" $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") mkdir ($nu.data-dir | path join "vendor/autoload")
starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu") starship init nu | save -f ($nu.data-dir | path join "vendor/autoload/starship.nu")
# load atuin history # load atuin history
@ -55,7 +51,6 @@ $env.config.keybindings = [
{send: Enter} {send: Enter}
] ]
} }
# reedline edits
{ {
name: insert_last_token name: insert_last_token
modifier: alt modifier: alt
@ -81,23 +76,10 @@ $env.config.keybindings = [
keycode: char_s keycode: char_s
mode: [emacs vi_insert vi_normal] mode: [emacs vi_insert vi_normal]
event: { event: {
send: ExecuteHostCommand send: executehostcommand
cmd: " let cmd = (commandline); commandline edit (if $cmd starts-with sudo { $cmd | str replace -r '^sudo ' '' } else { 'sudo ' ++ $cmd });" 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 name: run_zoxide
modifier: alt modifier: alt
@ -105,7 +87,7 @@ $env.config.keybindings = [
mode: ["emacs", "vi_normal", "vi_insert"] mode: ["emacs", "vi_normal", "vi_insert"]
event: { event: {
send: executehostcommand send: executehostcommand
cmd: " zoxide query --interactive" cmd: "zoxide query --interactive"
} }
} }
{ {
@ -115,7 +97,7 @@ $env.config.keybindings = [
mode: [ "vi_normal"] mode: [ "vi_normal"]
event: { event: {
send: executehostcommand send: executehostcommand
cmd: " zoxide query --interactive" cmd: "zoxide query --interactive"
} }
} }
{ {
@ -125,7 +107,6 @@ $env.config.keybindings = [
mode: ["emacs", "vi_normal", "vi_insert"] mode: ["emacs", "vi_normal", "vi_insert"]
event: { event: {
send: executehostcommand 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 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; let result = nu -l -i -c $fzf_ctrl_t_command;
@ -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 alias l = ls
@ -157,6 +127,3 @@ def --env mcd [path: path] {
} }
alias v = nvim alias v = nvim
# requires minimum nushell: 0.103 for job control
alias fg = job unfreeze

View file

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