refactor:

- use `zap-zsh` instead of manual plugin manager
- rename local plugins to meet naming conventions
This commit is contained in:
Tri Vo Khac committed 2023-06-05 13:08:15 +07:00
1 parent c0726ccec6
commit 1d04de7401
6 files changed
+17 -137

No files matched your search

+14 -63
View File
@@ -1,77 +1,28 @@
#!/usr/bin/env zsh
# Created by Zap installer
[ -f "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh" ] && source "${XDG_DATA_HOME:-$HOME/.local/share}/zap/zap.zsh"
# some useful options (man zshoptions)
setopt AUTO_CD EXTENDED_GLOB NOMATCH MENU_COMPLETE
setopt INTERACTIVE_COMMENTS
stty stop undef # Disable ctrl-s to freeze terminal.
zle_highlight=('paste:none')
# history
setopt APPEND_HISTORY
setopt INC_APPEND_HISTORY
setopt HIST_EXPIRE_DUPS_FIRST
setopt HIST_IGNORE_DUPS
setopt HIST_IGNORE_ALL_DUPS
setopt HIST_IGNORE_SPACE
setopt HIST_FIND_NO_DUPS
setopt HIST_SAVE_NO_DUPS
unsetopt EXTENDED_HISTORY
# beeping is annoying
unsetopt BEEP
# remove % symbol on prompt
unsetopt PROMPT_SP
# completions
# for brew
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
fi
autoload -Uz compinit
zstyle ':completion:*' menu select
# zstyle ':completion::complete:lsof:*' menu yes select
zmodload zsh/complist
# compinit
_comp_options+=(globdots) # Include hidden files.
autoload -U up-line-or-beginning-search
autoload -U down-line-or-beginning-search
zle -N up-line-or-beginning-search
zle -N down-line-or-beginning-search
# Colors
autoload -Uz colors && colors
# Useful Functions
source "$ZDOTDIR/zsh-functions"
# Normal files to source
zsh_add_file "zsh-exports"
zsh_add_file "zsh-aliases"
zsh_add_file "zsh-eval"
# Plugins
repos=(
# remote plugins
zsh-users/zsh-autosuggestions
zsh-users/zsh-completions
wintermi/zsh-brew
wintermi/zsh-lsd
zap-zsh/supercharge
zap-zsh/fzf
zap-zsh/fnm
zdharma-continuum/fast-syntax-highlighting
hlissner/zsh-autopair
wintermi/zsh-lsd
# local plugins
"$ZDOTDIR/aliases.zsh"
"$ZDOTDIR/exports.zsh"
"$ZDOTDIR/eval.zsh"
)
plugin-load $repos
for repo in $repos; do plug $repo; done
# Clean startup prompt
! [ -f ~/.hushlogin ] && touch ~/.hushlogin
# Load and initialise completion system
autoload -Uz compinit
compinit
# Edit line in vim with ctrl-e:
autoload edit-command-line; zle -N edit-command-line
# bindkey '^e' edit-command-line