-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathzshrc
91 lines (72 loc) · 2.46 KB
/
zshrc
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
[[ -f $HOME/.alias ]] && source $HOME/.alias
[[ -f $HOME/.exports ]] && source $HOME/.exports
[[ -f $HOME/.alias.local ]] && source $HOME/.alias.local
[[ -f $HOME/.exports.local ]] && source $HOME/.exports.local
# This line loads the compinit module to enable command line completion in the Zsh shell.
# See: https://gist.github.com/ctechols/ca1035271ad134841284#gistcomment-2308206
autoload -Uz compinit
if [[ -n ${ZDOTDIR}/.zcompdump(#qN.mh+24) ]]; then
compinit;
else
compinit -C;
fi;
setopt autocd
setopt hist_ignore_space
setopt hist_ignore_dups
# Completion Style
zstyle ':completion:*' completer _complete _ignored _correct _approximate
zstyle ':completion:*' group-name ''
zstyle ':completion:*' list-colors ''
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*'
zstyle ':completion:*' menu select=1
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s
zstyle ':completion:*' use-compctl false
zstyle :compinstall filename '$HOME/.zshrc'
ZSH_AUTOSUGGEST_STRATEGY=(history completion)
autoload -Uz compinit
compinit
# Keyboard Shortcuts
export ZVM_LINE_INIT_MODE=$ZVM_MODE_INSERT
autoload edit-command-line
bindkey '^R' history-incremental-search-backward
bindkey '^P' up-line-or-search
bindkey '^N' down-line-or-search
bindkey -M vicmd v edit-command-line
# Prompt
autoload -U promptinit; promptinit
if [ "$(uname)" = "Darwin" ]; then
fpath+=("$(brew --prefix)/share/zsh/site-functions")
fi
fpath+=($HOME/.zsh/pure)
zstyle :prompt:pure:git:stash show yes
prompt pure
# Antidote
if [[ -f /usr/share/zsh-antidote/antidote.zsh ]]; then
source /usr/share/zsh-antidote/antidote.zsh
fi
if [[ -f ${ZDOTDIR:-~}/.antidote/antidote.zsh ]]; then
source ${ZDOTDIR:-~}/.antidote/antidote.zsh
fi
if [ "$(uname)" = "Darwin" ]; then
source $(brew --prefix)/opt/antidote/share/antidote/antidote.zsh
fi
antidote load
eval "$(luarocks path --bin)"
eval "$(zoxide init zsh)"
# Needs to run after antidote
bindkey -v
bindkey '^j' autosuggest-accept
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
bindkey "^[[A" up-line-or-beginning-search # Up
bindkey "^[[B" down-line-or-beginning-search # Down
bindkey "^A" vi-beginning-of-line
bindkey "^P" up-line-or-search
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
# bun completions
[ -s "/Users/pedram/.bun/_bun" ] && source "/Users/pedram/.bun/_bun"
# bun
export BUN_INSTALL="$HOME/.bun"
export PATH="$BUN_INSTALL/bin:$PATH"