update to a working .zshrc
This commit is contained in:
64
.zshrc
64
.zshrc
@@ -7,6 +7,14 @@ if [[ ! -d "$HOME/.config/tmux/plugins/catppuccin" ]]; then
|
||||
git clone -b v2.1.2 https://github.com/catppuccin/tmux.git ~/.config/tmux/plugins/catppuccin/tmux
|
||||
fi
|
||||
|
||||
# pnpm
|
||||
export PNPM_HOME="/home/kyren/.local/share/pnpm"
|
||||
case ":$PATH:" in
|
||||
*":$PNPM_HOME:"*) ;;
|
||||
*) export PATH="$PNPM_HOME:$PATH" ;;
|
||||
esac
|
||||
# pnpm end
|
||||
|
||||
# Install zinit if missing
|
||||
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
|
||||
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f"
|
||||
@@ -24,23 +32,26 @@ autoload -Uz _zinit
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
# Fzf Completions
|
||||
zinit light Aloxaf/fzf-tab # Needs to be loaded before other plugins
|
||||
# Zsh plugins
|
||||
zinit ice wait lucid && zinit light zsh-users/zsh-syntax-highlighting
|
||||
zinit ice wait lucid && zinit light zsh-users/zsh-completions
|
||||
zinit ice wait lucid && zinit light Aloxaf/fzf-tab
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
|
||||
# Styling for fzf-tab completion
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||
zstyle ':completion:*' menu no
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath'
|
||||
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls $realpath'
|
||||
|
||||
# Zsh plugins
|
||||
zinit ice wait lucid && zinit light zsh-users/zsh-syntax-highlighting
|
||||
zinit ice wait lucid && zinit light zsh-users/zsh-completions
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
# Load oh my posh
|
||||
eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/tokyocat.omp.yml)"
|
||||
|
||||
# Shell integrations
|
||||
zinit ice wait lucid atload'eval "$(zoxide init --cmd cd zsh)"'
|
||||
zinit ice wait lucid atload'source <(k completion zsh)'
|
||||
eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/tokyocat.omp.yml)"
|
||||
zinit ice wait lucid atload'source <(fzf --zsh)' && zinit load zdharma-continuum/null
|
||||
zinit ice wait lucid atload'eval "$(zoxide init --cmd cd zsh)"' && zinit load zdharma-continuum/null
|
||||
zinit ice wait lucid atload'source <(k completion zsh)' && zinit load zdharma-continuum/null
|
||||
|
||||
# Fzf
|
||||
export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git"
|
||||
@@ -50,16 +61,13 @@ export FZF_DEFAULT_OPTS=" \
|
||||
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
|
||||
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
|
||||
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8"
|
||||
source fzf-git.sh
|
||||
source <(fzf --zsh)
|
||||
source $HOME/scripts/fzf-git.sh
|
||||
|
||||
# pnpm
|
||||
export PNPM_HOME="/home/kyren/.local/share/pnpm"
|
||||
case ":$PATH:" in
|
||||
*":$PNPM_HOME:"*) ;;
|
||||
*) export PATH="$PNPM_HOME:$PATH" ;;
|
||||
esac
|
||||
# pnpm end
|
||||
# # Keybindings
|
||||
bindkey -v # Vim Mode
|
||||
bindkey '^p' history-search-backward
|
||||
bindkey '^n' history-search-forward
|
||||
bindkey "^y" autosuggest-accept
|
||||
|
||||
# History
|
||||
HISTSIZE=100000
|
||||
@@ -74,12 +82,6 @@ setopt hist_save_no_dups
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_find_no_dups
|
||||
|
||||
# # Keybindings
|
||||
bindkey -v # Vim Mode
|
||||
bindkey '^p' history-search-backward
|
||||
bindkey '^n' history-search-forward
|
||||
bindkey "^y" autosuggest-accept
|
||||
|
||||
# Misc Aliases
|
||||
alias ls='eza --group-directories-first --across --icons auto'
|
||||
alias tree='eza --tree --icons'
|
||||
@@ -110,12 +112,12 @@ export WINEDEBUG=-all
|
||||
|
||||
# Path
|
||||
export GOPATH="$HOME/go"
|
||||
export PATH="$GOPATH/bin:$PATH"
|
||||
export PATH="$HOME/scripts:$PATH"
|
||||
export PATH="$HOME/.zig:$PATH"
|
||||
export PATH="$HOME/.zls:$PATH"
|
||||
export PATH="$HOME/projects/k/bin:$PATH"
|
||||
export PATH="$HOME/bin:$PATH"
|
||||
export PATH="$PATH:$GOPATH/bin"
|
||||
export PATH="$PATH:$HOME/scripts"
|
||||
export PATH="$PATH:$HOME/.zig"
|
||||
export PATH="$PATH:$HOME/.zls"
|
||||
export PATH="$PATH:$HOME/projects/k/bin"
|
||||
export PATH="$PATH:$HOME/bin"
|
||||
export PATH="$PATH:/opt/nvim-linux-x86_64/bin"
|
||||
|
||||
# Start ssh-agent if not running
|
||||
@@ -132,6 +134,6 @@ if [ -v K_SWITCH_HOME ]; then
|
||||
k switch $HOME
|
||||
fi
|
||||
|
||||
if false; then
|
||||
if true; then
|
||||
printf "\e[38;5;34m⚡ \e[38;5;220m.zshrc parsed in \e[38;5;33m%.0fms\e[0m\n" "$(( SECONDS * 1000 ))"
|
||||
fi
|
||||
|
||||
72
.zshrc-other
Normal file
72
.zshrc-other
Normal file
@@ -0,0 +1,72 @@
|
||||
|
||||
# Zsh plugins
|
||||
zinit ice wait lucid && zinit light zsh-users/zsh-syntax-highlighting
|
||||
zinit ice wait lucid && zinit light zsh-users/zsh-completions
|
||||
zinit ice wait lucid && zinit light Aloxaf/fzf-tab
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
|
||||
# Completion styling
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||
zstyle ':completion:*' menu no
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath'
|
||||
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls $realpath'
|
||||
|
||||
# Load oh my posh
|
||||
eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/tokyocat.omp.yml)"
|
||||
|
||||
# Shell integrations
|
||||
zinit ice wait lucid atload'source <(fzf --zsh)' && zinit load zdharma-continuum/null
|
||||
zinit ice wait lucid atload'eval "$(zoxide init --cmd cd zsh)"' && zinit load zdharma-continuum/null
|
||||
zinit ice wait lucid atload'source <(k completion zsh)' && zinit load zdharma-continuum/null
|
||||
|
||||
# Fzf
|
||||
export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git"
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
export FZF_ALT_C_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .git"
|
||||
export FZF_DEFAULT_OPTS=" \
|
||||
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
|
||||
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
|
||||
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8"
|
||||
source fzf-git.sh
|
||||
|
||||
##############################33
|
||||
##############################33
|
||||
##############################33
|
||||
##############################33
|
||||
##############################33
|
||||
##############################33
|
||||
##############################33
|
||||
##############################33
|
||||
##############################33
|
||||
##############################33
|
||||
##############################33
|
||||
|
||||
# Fzf Completions
|
||||
zinit light Aloxaf/fzf-tab # Needs to be loaded before other plugins
|
||||
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||
zstyle ':completion:*' menu no
|
||||
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls $realpath'
|
||||
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls $realpath'
|
||||
|
||||
# Zsh plugins
|
||||
zinit ice wait lucid && zinit light zsh-users/zsh-syntax-highlighting
|
||||
zinit ice wait lucid && zinit light zsh-users/zsh-completions
|
||||
zinit light zsh-users/zsh-autosuggestions
|
||||
|
||||
# Shell integrations
|
||||
zinit ice wait lucid atload'eval "$(zoxide init --cmd cd zsh)"'
|
||||
zinit ice wait lucid atload'source <(k completion zsh)'
|
||||
eval "$(oh-my-posh init zsh --config $HOME/.config/ohmyposh/tokyocat.omp.yml)"
|
||||
|
||||
# Fzf
|
||||
export FZF_DEFAULT_COMMAND="fd --hidden --strip-cwd-prefix --exclude .git"
|
||||
export FZF_CTRL_T_COMMAND="$FZF_DEFAULT_COMMAND"
|
||||
export FZF_ALT_C_COMMAND="fd --type=d --hidden --strip-cwd-prefix --exclude .git"
|
||||
export FZF_DEFAULT_OPTS=" \
|
||||
--color=bg+:#313244,bg:#1e1e2e,spinner:#f5e0dc,hl:#f38ba8 \
|
||||
--color=fg:#cdd6f4,header:#f38ba8,info:#cba6f7,pointer:#f5e0dc \
|
||||
--color=marker:#f5e0dc,fg+:#cdd6f4,prompt:#cba6f7,hl+:#f38ba8"
|
||||
source fzf-git.sh
|
||||
source <(fzf --zsh)
|
||||
Reference in New Issue
Block a user