chore(fish): simplified fish config to be the "same" as my zsh config

This commit is contained in:
Afonso Franco 2025-02-05 16:56:35 +00:00
parent 4933308689
commit e0b9a10150
Signed by: afonso
SSH key fingerprint: SHA256:gkVPzsQQJzqi21ntQBV6pXTx4bYI53rFGI4XtvCpwd4
34 changed files with 176 additions and 1188 deletions

View file

@ -1,37 +1,52 @@
if status is-interactive
# Commands to run in interactive sessions can go here
and not set -q TMUX
tmux new-session -A -s 0
end
fish_default_key_bindings
set -gx EDITOR nvim
set -gx READER mupdf
set -g fish_greeting
fish_vi_key_bindings
bind -M insert \t complete-and-search
bind -M insert --key btab complete
fish_add_path /opt/homebrew/bin
fish_add_path /opt/homebrew/opt/openjdk@17/bin
fish_add_path $HOME/.bun/bin
fish_add_path $HOME/go/bin
# XDG directories
set -x XDG_CONFIG_HOME "$HOME/.config"
set -x XDG_CACHE_HOME "$HOME/.cache"
set -x XDG_DATA_HOME "$HOME/.local/share"
set -x XDG_STATE_HOME "$HOME/.local/state"
set -x XDG_RUNTIME_DIR /tmp
set -x EDITOR nvim
set -x VISUAL nvim
set -x READER mupdf
set -x GOPATH "$HOME/go"
set -x GOBIN "$GOPATH/bin"
# OS-specific exports
if test (uname) = "Darwin"
set -x JAVA_HOME (eval /usr/libexec/java_home)
set -x GEM_HOME "$HOME/.gem"
fish_add_path /opt/homebrew/bin
fish_add_path /opt/homebrew/opt/texlive/bin
fish_add_path $GEM_HOME/bin
end
# Common paths
fish_add_path /usr/sbin
fish_add_path /sbin
fish_add_path $HOME/.local/share/nvim/mason/bin
fish_add_path /home/afonso/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin
fish_add_path $HOME/.local/bin
fish_add_path $HOME/go/bin
fish_add_path $HOME/.cargo/bin
fish_add_path $HOME/.ghcup/bin
fish_add_path /usr/bin/vendor_perl
fish_add_path $HOME/.cabal/bin
source ~/.config/fish/myfunctions/dotfiles.fish
source ~/.config/fish/myfunctions/pacman.fish
source ~/.config/fish/myfunctions/qol.fish
source ~/.config/fish/myfunctions/replacements.fish
# bun
set --export BUN_INSTALL "$HOME/.bun"
set --export PATH $BUN_INSTALL/bin $PATH
# opam configuration
source /home/afonso/.opam/opam-init/init.fish > /dev/null 2> /dev/null; or true
tmux new-session -A -s main
starship init fish | source
if test (uname) = "Darwin"
eval (/opt/homebrew/bin/brew shellenv)
end
fzf --fish | source
# Added by LM Studio CLI (lms)
set -gx PATH $PATH /Users/afonso/.lmstudio/bin