diff --git a/config/fish/conf.d/brew.fish b/config/fish/conf.d/brew.fish new file mode 100644 index 0000000..286855f --- /dev/null +++ b/config/fish/conf.d/brew.fish @@ -0,0 +1,2 @@ +# source brew shellenv +/opt/homebrew/bin/brew shellenv | source diff --git a/config/fish/conf.d/editor_environment.fish b/config/fish/conf.d/editor_environment.fish new file mode 100644 index 0000000..237358b --- /dev/null +++ b/config/fish/conf.d/editor_environment.fish @@ -0,0 +1,3 @@ +set -q EDITOR || set -x EDITOR nvim +set -q VISUAL || set -x VISUAL nvim +set -q MANPAGER || set -x MANPAGER "nvim +Man!" diff --git a/config/fish/conf.d/fzf.fish b/config/fish/conf.d/fzf.fish index 8156c11..75e37fc 100644 --- a/config/fish/conf.d/fzf.fish +++ b/config/fish/conf.d/fzf.fish @@ -1,6 +1,6 @@ # fzf.fish is only meant to be used in interactive mode. If not in interactive mode and not in CI, skip the config to speed up shell startup if not status is-interactive && test "$CI" != true - exit + exit end # Because of scoping rules, to capture the shell variables exactly as they are, we must read @@ -10,8 +10,8 @@ end set --global _fzf_search_vars_command '_fzf_search_variables (set --show | psub) (set --names | psub)' -# Install the default bindings, which are mnemonic and minimally conflict with fish's preset bindings -fzf_configure_bindings +# Install user-modified key bindings +fzf_configure_bindings --directory=\ct --git_log=\cf --git_status=\cg --processes=\cp # Doesn't erase autoloaded _fzf_* functions because they are not easily accessible once key bindings are erased function _fzf_uninstall --on-event fzf_uninstall @@ -26,3 +26,7 @@ function _fzf_uninstall --on-event fzf_uninstall echo "You may need to manually remove fzf_configure_bindings from your config.fish if you were using custom key bindings." set_color normal end + +# fzf configurations +set fzf_preview_dir_cmd eza --all --color=always --icons +set fzf_diff_highlighter delta --paging=never --width=20 diff --git a/config/fish/conf.d/starship.fish b/config/fish/conf.d/starship.fish new file mode 100644 index 0000000..6956723 --- /dev/null +++ b/config/fish/conf.d/starship.fish @@ -0,0 +1,5 @@ +if not status is-interactive && test "$CI" != true + exit +end + +starship init fish | source diff --git a/config/fish/conf.d/xdg.fish b/config/fish/conf.d/xdg.fish new file mode 100644 index 0000000..549d7d7 --- /dev/null +++ b/config/fish/conf.d/xdg.fish @@ -0,0 +1,4 @@ +set -x XDG_CACHE_HOME $HOME/.cache +set -x XDG_CONFIG_HOME $HOME/.config +set -x XDG_DATA_HOME $HOME/.local/share +set -x XDG_STATE_HOME $HOME/.local/state diff --git a/config/fish/conf.d/zoxide.fish b/config/fish/conf.d/zoxide.fish new file mode 100644 index 0000000..b0aeffd --- /dev/null +++ b/config/fish/conf.d/zoxide.fish @@ -0,0 +1,5 @@ +if not status is-interactive && test "$CI" != true + exit +end + +zoxide init fish | source diff --git a/config/fish/config.fish b/config/fish/config.fish deleted file mode 100644 index cae4cab..0000000 --- a/config/fish/config.fish +++ /dev/null @@ -1,26 +0,0 @@ -# xdg config -set -x XDG_CACHE_HOME $HOME/.cache -set -x XDG_CONFIG_HOME $HOME/.config -set -x XDG_DATA_HOME $HOME/.local/share -set -x XDG_STATE_HOME $HOME/.local/state - -# variables with defaults -set -q EDITOR || set -x EDITOR nvim -set -q VISUAL || set -x VISUAL nvim -set -q MANPAGER || set -x MANPAGER "nvim +Man!" - -# source brew shellenv - /opt/homebrew/bin/brew shellenv | source - -# prompt -starship init fish | source - -# zoxide -zoxide init fish | source - -# fzf bindings -fzf_configure_bindings --directory=\ct --git_log=\cf --git_status=\cg --processes=\cp - -# fzf configurations -set fzf_preview_dir_cmd eza --all --color=always --icons -set fzf_diff_highlighter delta --paging=never --width=20