Skip to content

Commit

Permalink
zsh wip
Browse files Browse the repository at this point in the history
  • Loading branch information
mosheavni committed Nov 11, 2024
1 parent d97e222 commit 54839e0
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 18 deletions.
19 changes: 11 additions & 8 deletions .zsh_plugins.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
mattmc3/ez-compinit

# completions
zsh-users/zsh-completions kind:fpath path:src
belak/zsh-utils path:completion/functions kind:autoload post:compstyle_zshzoo_setup

loiccoyle/zsh-github-copilot
ohmyzsh/ohmyzsh path:plugins/aliases
ohmyzsh/ohmyzsh path:plugins/asdf kind:defer
ohmyzsh/ohmyzsh path:plugins/argocd
ohmyzsh/ohmyzsh path:plugins/asdf
ohmyzsh/ohmyzsh path:plugins/aws
ohmyzsh/ohmyzsh path:plugins/branch
ohmyzsh/ohmyzsh path:plugins/colored-man-pages
ohmyzsh/ohmyzsh path:plugins/command-not-found
ohmyzsh/ohmyzsh path:plugins/common-aliases
ohmyzsh/ohmyzsh path:plugins/copybuffer
ohmyzsh/ohmyzsh path:plugins/dircycle
ohmyzsh/ohmyzsh path:plugins/fzf
ohmyzsh/ohmyzsh path:plugins/git
ohmyzsh/ohmyzsh path:plugins/git-auto-fetch
Expand All @@ -21,8 +20,12 @@ ohmyzsh/ohmyzsh path:plugins/golang
ohmyzsh/ohmyzsh path:plugins/kube-ps1
ohmyzsh/ohmyzsh path:plugins/kubectl
ohmyzsh/ohmyzsh path:plugins/kubectx
ohmyzsh/ohmyzsh path:plugins/terraform
ohmyzsh/ohmyzsh path:plugins/urltools
zsh-users/zsh-autosuggestions
zsh-users/zsh-history-substring-search
zdharma-continuum/fast-syntax-highlighting
zsh-users/zsh-autosuggestions kind:defer
zsh-users/zsh-history-substring-search kind:defer
zsh-users/zsh-syntax-highlighting kind:defer

# this is last
belak/zsh-utils path:completion
ohmyzsh/ohmyzsh path:plugins/terraform kind:fpath
ohmyzsh/ohmyzsh path:plugins/docker/completions kind:fpath
40 changes: 30 additions & 10 deletions .zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,35 @@ zmodload zsh/zprof
# Basic ZSH Config #
# ================ #

[[ -n "$ZSH" ]] || export ZSH="${${(%):-%x}:a:h}"
[[ -n "$ZSH_CUSTOM" ]] || ZSH_CUSTOM="$ZSH/custom"
[[ -n "$ZSH_CACHE_DIR" ]] || ZSH_CACHE_DIR="$ZSH/cache"
if [[ ! -w "$ZSH_CACHE_DIR" ]]; then
ZSH_CACHE_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/antidote"
fi
mkdir -p "$ZSH_CACHE_DIR/completions"

# Ensure path arrays do not contain duplicates.
typeset -gU path fpath

# Additional PATHs
export PATH="/opt/homebrew/bin:/opt/homebrew/sbin:$PATH"
export PATH="/opt/homebrew/opt/make/libexec/gnubin:$PATH"
export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
export PATH="/usr/local/opt/curl/bin:$PATH"
export PATH="/usr/local/opt/ruby/bin:$PATH"
export PATH="$HOME/.bin:$HOME/.local/bin:$PATH"
export PATH="$HOME/.cargo/bin:${PATH}"
export PATH="/usr/local/sbin:$PATH"
export PATH="/usr/local/opt/postgresql@15/bin:$PATH"
path=(
/opt/homebrew/bin
/opt/homebrew/sbin
/opt/homebrew/opt/make/libexec/gnubin
${KREW_ROOT:-$HOME/.krew}/bin
/usr/local/opt/curl/bin
/usr/local/opt/ruby/bin
$HOME/.bin
$HOME/.local/bin
$HOME/.cargo/bin
/usr/local/sbin
/usr/local/opt/postgresql@15/bin
$path
)

# Export PATH
export PATH
export XDG_CONFIG_HOME=${HOME}/.config

unset ZSH_AUTOSUGGEST_USE_ASYNC
Expand Down Expand Up @@ -47,6 +63,7 @@ setopt HIST_BEEP # Beep when accessing nonexistent history.
# ============= #
# Autoloaders #
# ============= #
fpath+=($ZSH_CACHE_DIR/completions)
source $HOME/.antidote/antidote.zsh
antidote load
export FZF_DEFAULT_COMMAND='ag --hidden --ignore .git -l -g ""'
Expand All @@ -57,15 +74,18 @@ export FZF_CTRL_T_OPTS='--preview "bat --color=always --style=numbers,changes {}
# ================ #
# PS1 and Random #
# ================ #
complete -o nospace -C terragrunt -C terraform terragrunt
# complete -o nospace -C terragrunt -C terraform terragrunt
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
export EDITOR="nvim"
export AWS_PAGER=""
export WORDCHARS=""
setopt MENU_COMPLETE
unsetopt AUTO_MENU
unsetopt CASE_GLOB
setopt GLOB_COMPLETE
eval "$(zoxide init --cmd cd zsh)"

# ASDF
export ASDF_PYTHON_DEFAULT_PACKAGES_FILE=~/Repos/dotfiles/requirements.txt
[[ -f ~/.asdf/plugins/golang/set-env.zsh ]] && {
source ~/.asdf/plugins/golang/set-env.zsh
Expand Down

0 comments on commit 54839e0

Please sign in to comment.