-
Notifications
You must be signed in to change notification settings - Fork 2
/
.zshrc
118 lines (90 loc) Β· 3.01 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# Enable Powerlevel10k 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
if [[ "$OSTYPE" == "linux-gnu" ]]; then
ZSH_THEME="powerlevel10k/powerlevel10k"
fi
### Loading Performance Tool
# zmodload zsh/zprof
#
# timezsh() {
# shell=${1-$SHELL}
# for i in $(seq 1 10); do /usr/bin/time $shell -i -c exit; done
# }
# Export Oh my zsh
export ZSH="$HOME/.oh-my-zsh"
### Sets Neovim as default editor
export EDITOR="nvim"
### ALIAS Settings
if [[ -f ~/.alias ]]; then
source ~/.alias
fi
### New NVM
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
### nvm lazy mode
zstyle ':omz:plugins:nvm' lazy yes
### makes completion case insensitive
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
### PLUGINS
plugins=(
nvm
zsh-autosuggestions
zsh-vi-mode
zsh-syntax-highlighting
)
### SOURCING OH MY ZSH
if [[ -f ~/.oh-my-zsh/oh-my-zsh.sh ]]; then
export ZSH_COMPDUMP=$ZSH/cache/.zcompdump-$HOST
source ~/.oh-my-zsh/oh-my-zsh.sh
fi
### ZSH-AUTOSUGGESTIONS settings
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
# bindkey '^ ' autosuggest-accept # accept suggestion with ctrl+space
bindkey '^H' backward-kill-word
fi
### Suggestions colors
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#6c6c6c,bold,underline"
### Accept suggestion with ctrl+space
bindkey '^ ' autosuggest-accept
### Makes autosuggest-accept and zsh-vi-mode compatible. Source: https://github.com/jeffreytse/zsh-vi-mode/issues/57#issuecomment-799364881
function zvm_after_init() {
zvm_bindkey viins '^@' autosuggest-accept
}
### FZF settings
if type rg &> /dev/null; then
export FZF_DEFAULT_COMMAND='rg --files'
export FZF_DEFAULT_OPTS='-m --height 50% --border'
fi
### VI-MODE Settings
ZVM_NORMAL_MODE_CURSOR=$ZVM_CURSOR_BLOCK
### NVIM Color Settings
COLORTERM="truecolor"
### Making firma's scripts available system-wide
export PATH="$HOME/.cargo/bin:$PATH"
### Add my local scripts folder to PATH
export PATH="$HOME/Code/scripts/shell:$PATH"
### Pyenv settings
export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
### Broot settings
source $HOME/.config/broot/launcher/bash/br
### set/gsed PATH:
export PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
### KITTY env var
KITTY_CONFIG_DIRECTORY="$HOME/.config/kitty/"
### Zoxide
eval "$(zoxide init zsh)"
### Starship call
# eval "$(starship init zsh)"
### Powerlevel10k
if [[ "$OSTYPE" == "darwin"* ]]; then
source /opt/homebrew/share/powerlevel10k/powerlevel10k.zsh-theme
fi
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh