-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathzshrc.zsh
72 lines (61 loc) · 3.12 KB
/
zshrc.zsh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Enable Powerlevel7k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
### Added by Zinit's installer
local ZI_REPO="zdharma-continuum"
ZI_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit"
ZI_BIN="${ZI_HOME}/zinit.git"
if [[ ! -e ${ZI_BIN}/zinit.zsh ]] {
command mkdir -p "$(dirname ${ZI_HOME})" && command git clone --depth=1 "https://github.com/${ZI_REPO}/zinit.git" ${ZI_BIN}
command chmod g-rwX ${ZI_HOME} && zcompile ${ZI_BIN}/zinit.zsh
}
source ${ZI_BIN}/zinit.zsh
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
### End of Zinit's installer chunk
# Load a few important annexes, without Turbo
# (this is currently required for annexes)
zinit light-mode depth"1" for \
${ZI_REPO}/zinit-annex-bin-gem-node \
atload"[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh" romkatv/powerlevel10k
# Completion enhancements
zinit wait lucid depth"1" light-mode for \
atinit"zicompinit; zicdreplay" \
Aloxaf/fzf-tab \
${ZI_REPO}/fast-syntax-highlighting \
atinit"ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE=20;ZSH_AUTOSUGGEST_STRATEGY=(history completion match_prev_cmd)" atload"_zsh_autosuggest_start" \
zsh-users/zsh-autosuggestions \
trackbinds bindmap"^R -> ^H" \
${ZI_REPO}/history-search-multi-word \
blockf atpull'zinit creinstall -q .' \
zsh-users/zsh-completions
# git extensions
zinit wait"0a" lucid depth"1" for \
as"program" pick"$ZPFX/bin/git-*" src"etc/git-extras-completion.zsh" make"PREFIX=$ZPFX" tj/git-extras \
atload"source <(lua $ZINIT[PLUGINS_DIR]/skywind3000---z.lua/z.lua --init zsh enhanced once fzf);export _ZL_HYPHEN=1" skywind3000/z.lua \
wfxr/forgit
# Modern Unix commands
# See https://github.com/ibraheemdev/modern-unix
zinit wait lucid as"null" from"gh-r" for \
sbin"fzf" atload'eval "$(fzf --zsh)"' junegunn/fzf \
sbin"**/delta" atload"alias diff='delta -ns'" dandavison/delta \
sbin"**/fd" cp"**/fd.1 -> $ZPFX/man/man1" completions @sharkdp/fd \
sbin"**/vivid" atload'export LS_COLORS="$(vivid generate catppuccin-macchiato)"' @sharkdp/vivid \
sbin"buf* -> buf" atload"source <(buf completion zsh)" bufbuild/buf \
sbin"**/golangci-lint" atload"source <(golangci-lint completion zsh)" golangci/golangci-lint \
sbin"bin/lua-language-server" bpick"*x64.tar.gz" LuaLS/lua-language-server \
sbin"neocmakelsp* -> neocmakelsp" neocmakelsp/neocmakelsp \
sbin"btm" atload"alias top=btm" completions ClementTsang/bottom \
sbin"marksman* -> marksman" artempyanykh/marksman
if (( $+commands[eza] )); then
alias ls='eza --color=auto --icons --group-directories-first'
alias ll='ls -alh --time-style=long-iso'
alias la='ls -a'
alias tree='ls -T'
fi
(( $+commands[bat] )) && alias cat='bat -p --wrap character'
(( $+commands[tldr] )) && alias help='tldr'
source $HOME/myDoc/dotfiles/zsh/conf.zsh