-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
88 lines (72 loc) · 2.17 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
# envs
# export PYENV_ROOT="$HOME/dev/pyenv"
# [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
export UV_CACHE_DIR="$HOME/dev/uv/cache/"
export UV_PYTHON_PREFERENCE=only-managed
export UV_PYTHON_INSTALL_DIR="$HOME/dev/uv/python/"
export UV_TOOL_DIR="$HOME/dev/uv/tools/"
export UV_TOOL_BIN_DIR="$HOME/dev/uv/bin/"
export UV_LINK_MODE=symlink
export PATH="$UV_TOOL_BIN_DIR:$PATH"
export EDITOR=nvim
export GPG_TTY=$(tty)
export PATH="$PATH:$HOME/.local/share/spotify-launcher/install/usr/share/spotify/"
export PATH="$PATH:$HOME/go/bin/"
# Set the zinit home directory
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
# Download zinit, if it's not there
if [[ ! -d "$ZINIT_HOME" ]]; then
mkdir -p "$(dirname $ZINIT_HOME)"
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
fi
# Load zinit
source "${ZINIT_HOME}/zinit.zsh"
# zsh plugins
zinit light zsh-users/zsh-syntax-highlighting
zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions
zinit light Aloxaf/fzf-tab
# Load completions
autoload -U compinit && compinit
zinit cdreplay -q
# Keybinds
# bindkey -e
bindkey '^p' history-search-backward
bindkey '^n' history-search-forward
bindkey '^[[H' beginning-of-line
bindkey '^[[F' end-of-line
# bindkey '^[[3~' delete-char
# History
HISTSIZE=5000
HISTFILE=~/.zhistory
SAVEHIST=$HISTSIZE
HISTDUP=erase
setopt appendhistory
setopt sharehistory
setopt hist_ignore_space
setopt hist_ignore_all_dups
setopt hist_save_no_dups
setopt hist_ignore_dups
setopt hist_find_no_dups
# Completion style
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*' menu no
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'ls --color $realpath'
zstyle ':fzf-tab:complete:__zoxide_z:*' fzf-preview 'ls --color $realpath'
# Aliases
alias ls='ls --color'
alias grep='grep --color=auto'
alias neofetch='fastfetch'
# never beep
setopt NO_BEEP
# Shell integrations
# eval "$(pyenv init - zsh)"
eval "$(fzf --zsh)"
eval "$(zoxide init --cmd cd zsh)"
# starship
function starship_transient_prompt_func {
starship module character
}
eval "$(starship init zsh)"
enable_transience