Skip to content

Instantly share code, notes, and snippets.

@rromanv
Last active June 24, 2023 00:05
Show Gist options
  • Save rromanv/95f6624824e7b4c1d5664c0a34518c5b to your computer and use it in GitHub Desktop.
Save rromanv/95f6624824e7b4c1d5664c0a34518c5b to your computer and use it in GitHub Desktop.
New ZSH Conf
# Jump to a common used Folder https://github.com/rupa/z/
rupa/z
# https://github.com/zsh-users/zsh-completions
zsh-users/zsh-completions
# Oh My Zsh Library folder to use their plugins
ohmyzsh/ohmyzsh path:lib
# prompts:
# with prompt plugins, remember to add this to your .zshrc:
# `autoload -Uz promptinit && promptinit && prompt pure`
sindresorhus/pure kind:fpath
romkatv/powerlevel10k kind:fpath
ogham/exa path:completions/zsh kind:fpath
zsh-users/zsh-autosuggestions
zdharma-continuum/fast-syntax-highlighting kind:defer
zsh-users/zsh-history-substring-search
sorin-ionescu/prezto path:modules/helper
sorin-ionescu/prezto path:modules/environment
sorin-ionescu/prezto path:modules/node
ohmyzsh/ohmyzsh path:plugins/alias-finder
ohmyzsh/ohmyzsh path:plugins/aliases
ohmyzsh/ohmyzsh path:plugins/archlinux
ohmyzsh/ohmyzsh path:plugins/brew
ohmyzsh/ohmyzsh path:plugins/colorize
ohmyzsh/ohmyzsh path:plugins/command-not-found
ohmyzsh/ohmyzsh path:plugins/common-aliases
ohmyzsh/ohmyzsh path:plugins/fzf
ohmyzsh/ohmyzsh path:plugins/gitfast
ohmyzsh/ohmyzsh path:plugins/gitignore
ohmyzsh/ohmyzsh path:plugins/last-working-dir
ohmyzsh/ohmyzsh path:plugins/vscode
# https://github.com/belak/zsh-utils
belak/zsh-utils path:editor
belak/zsh-utils path:history
belak/zsh-utils path:prompt
belak/zsh-utils path:utility
belak/zsh-utils path:completion
lukechilds/zsh-better-npm-completion
akccakcctw/zsh-better-pnpm-completion
Aloxaf/fzf-tab
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
autoload -Uz compinit
compinit -i
# Antidote ZSH Plugin Manager https://getantidote.github.io/install
antidote_dir=${ZDOTDIR:-~}/.antidote
plugins_txt=${ZDOTDIR:-~}/.zsh_plugins.txt
static_file=${ZDOTDIR:-~}/.zsh_plugins.zsh
# Clone antidote if necessary and generate a static plugin file.
if [[ ! $static_file -nt $plugins_txt ]]; then
[[ -e $antidote_dir ]] ||
git clone --depth=1 https://github.com/mattmc3/antidote.git $antidote_dir
(
source $antidote_dir/antidote.zsh
[[ -e $plugins_txt ]] || touch $plugins_txt
antidote bundle <$plugins_txt >$static_file
)
fi
# Uncomment this if you want antidote commands like `antidote update` available
# in your interactive shell session:
autoload -Uz $antidote_dir/functions/antidote
# source the static plugins file
source $static_file
# cleanup
unset antidote_dir plugins_file static_file
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
#autoload -Uz promptinit && promptinit && prompt powerlevel10k
autoload -Uz promptinit && promptinit && prompt pure
bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down
# disable sort when completing `git checkout`
zstyle ':completion:*:git-checkout:*' sort false
# set descriptions format to enable group support
zstyle ':completion:*:descriptions' format '[%d]'
# set list-colors to enable filename colorizing
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
# preview directory's content with exa when completing cd
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'exa -1 --color=always $realpath'
# switch group using `,` and `.`
zstyle ':fzf-tab:*' switch-group ',' '.'
alias code=code-insiders
alias cat='bat --paging=never --plain'
alias lls='exa -lbhHFGmuSa --group-directories-first --icons --git'
alias llt='exa -lbhHFGmuSa --group-directories-first --icons --git -snew'
#unalias ls
# bun completions
[ -s "/home/rromanve/.bun/_bun" ] && source "/home/rromanve/.bun/_bun"
# bun
export BUN_INSTALL="/home/rromanve/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"
export ZSH_FNM_ENV_EXTRA_ARGS="--use-on-cd"
# pnpm
export PNPM_HOME="/home/rromanve/.local/share/pnpm"
export PATH="$PNPM_HOME:$PATH"
# pnpm end
#[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
export VOLTA_HOME="$HOME/.volta"
export DOT_LOCAL="$HOME/.local"
export PATH="$VOLTA_HOME/bin:$DOT_LOCAL/bin:$PATH"
eval "$(github-copilot-cli alias -- "$0")"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment