fix: completing this round of updates to the zsh setup for startup

times, testing with other prompts (Pure) and cleaning up the config
files for better modularity and coherent settings.
This commit is contained in:
2026-03-29 18:34:02 -05:00
parent 72ef502512
commit cc86b9d1bd
3 changed files with 38 additions and 58 deletions

View File

@@ -9,6 +9,7 @@ declare -A configs=(
["zsh/zshrc"]="$HOME/.zshrc" ["zsh/zshrc"]="$HOME/.zshrc"
["zsh/zsh_functions"]="$HOME/.config/zsh/zsh_functions.zsh" ["zsh/zsh_functions"]="$HOME/.config/zsh/zsh_functions.zsh"
["zsh/zsh_aliases"]="$HOME/.config/zsh/zsh_aliases.zsh" ["zsh/zsh_aliases"]="$HOME/.config/zsh/zsh_aliases.zsh"
["zsh/zsh_exports"]="$HOME/.config/zsh/zsh_exports.zsh"
["fb-custom.zsh-theme"]="$HOME/.oh-my-zsh/custom/themes" ["fb-custom.zsh-theme"]="$HOME/.oh-my-zsh/custom/themes"
["nvim/init.lua"]="$HOME/.config/nvim/init.lua" ["nvim/init.lua"]="$HOME/.config/nvim/init.lua"
["nvim/lua"]="$HOME/.config/nvim/" ["nvim/lua"]="$HOME/.config/nvim/"

2
zsh/zsh_exports Normal file
View File

@@ -0,0 +1,2 @@
export EDITOR=nvim
export MANPAGER="less -R --use-color -Dd+r -Du+b" # Colored MAN pages

View File

@@ -1,65 +1,46 @@
# call `zprof` to profile all calls in the current shell # call `zprof` to profile all calls in the current shell
# Uncomment here and at the bottom of the file, then fully reopen a terminal # Uncomment here and at the bottom of the file, then fully reopen a terminal
zmodload zsh/zprof # zmodload zsh/zprof
# Path additions
path=( path=(
$GOPATH/bin $GOPATH/bin
$HOME/.cargo/bin $HOME/.cargo/bin
$HOME/.local/bin $HOME/.local/bin
$NVM_CONFIG_PREFIX/bin
$path $path
) )
# De-dupe path entries
typeset -U path typeset -U path
path=($^path(N-/))
if type brew; then
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
else
source /usr/share/zsh/site-functions/zsh-autosuggestions.zsh
fi
# Install oh-my-zsh if it doesn't exist # Install oh-my-zsh if it doesn't exist
# if [ ! -d $HOME/.oh-my-zsh/ ] if [ ! -d $HOME/.oh-my-zsh/ ]
# then then
# sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# fi
### ZSH Configuration
## Path variables
# Path to your oh-my-zsh installation.
# export ZSH="$HOME/.oh-my-zsh"
export MANPAGER="less -R --use-color -Dd+r -Du+b" # Colored MAN pages
# ZSH_THEME="fb-custom"
# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
HYPHEN_INSENSITIVE="true"
DISABLE_AUTO_UPDATE="true"
### Plugins
# Install the zsh-autosuggestions plugin if it doesn't exist
# if [ ! -d ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions ]
# then
# git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# fi
# plugins=(
# zsh-autosuggestions
# virtualenvwrapper # Used for autoloading project .venvs
# )
# ZSH autosuggestions
if type brew &>/dev/null; then
fi fi
autoload -Uz compinit export ZSH="$HOME/.oh-my-zsh"
compinit -u
# FZF load # Install the zsh-autosuggestions plugin if it doesn't exist
source <(fzf --zsh) if [ ! -d ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions ]
then
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
fi
plugins=(
fzf
zsh-autosuggestions
# zsh-syntax-highlighting
virtualenvwrapper
)
# Disable the startup update checks
zstyle ':omz:update' mode disabled
ZSH_THEME="fb-custom"
# Hyphen insensitive completion, `-` and `_` are treated as interchangeable
HYPHEN_INSENSITIVE="true"
# Vim mode setup # Vim mode setup
set -o vi set -o vi
@@ -70,11 +51,11 @@ setopt hist_ignore_all_dups # Replace old history with the newest call to an ide
setopt hist_ignore_space # Remove history lines that start with spaces setopt hist_ignore_space # Remove history lines that start with spaces
setopt share_history # Share history between zsh instances without needing explicit sharing setopt share_history # Share history between zsh instances without needing explicit sharing
setopt auto_param_slash # Auto append a slash instead of a space if the completion is a dir setopt auto_param_slash # Auto append a slash instead of a space if the completion is a dir
setopt extended_glob null_glob # Use Bash-like globbing
# Experimental # Experimental
setopt append_history inc_append_history setopt append_history inc_append_history
setopt no_case_glob no_case_match setopt no_case_glob no_case_match
setopt extended_glob null_glob
# Completion options # Completion options
# Give descriptions of what the types of completions given # Give descriptions of what the types of completions given
@@ -82,24 +63,19 @@ zstyle ':completion:*:descriptions' format '%U%B%d%b%u'
# Give an actual output when there is no match # Give an actual output when there is no match
zstyle ':completion:*:warnings' format '%BNo matches for: %d%b' zstyle ':completion:*:warnings' format '%BNo matches for: %d%b'
### User configuration
export EDITOR=nvim
export NVM_CONFIG_PREFIX=$HOME/.local/
# Autoload keychain for ssh-agent handling if it is installed # Autoload keychain for ssh-agent handling if it is installed
# if command -v keychain &> /dev/null if command -v keychain &> /dev/null
# then then
# eval $(keychain --eval --quiet --nogui --noask) eval $(keychain --eval --quiet --nogui --noask)
# fi fi
# TODO: Replace above with GPG agent # TODO: Replace above with GPG agent
# GPG Agent handling of ssh key authorization and unlocks # GPG Agent handling of ssh key authorization and unlocks
# Inclusion of files to extend the configuration # Inclusion of files to extend the configuration
# From a theme to local specific changes, and grouping functions/aliases/exports # From a theme to local specific changes, and grouping functions/aliases/exports
include_files=( include_files=(
"$HOME/.config/zsh/fb_theme.zsh" # "$HOME/.config/zsh/fb_theme.zsh"
"$HOME/.config/zsh/zsh_local.zsh" "$HOME/.config/zsh/zsh_local.zsh"
"$HOME/.config/zsh/zsh_aliases.zsh" "$HOME/.config/zsh/zsh_aliases.zsh"
"$HOME/.config/zsh/zsh_exports.zsh" "$HOME/.config/zsh/zsh_exports.zsh"
@@ -115,6 +91,7 @@ for file in $include_files; do
source $file source $file
done done
source $ZSH/oh-my-zsh.sh
# Call to zprof for startup timings # Call to zprof for startup timings
zprof # zprof