-
Notifications
You must be signed in to change notification settings - Fork 0
/
dot_zshrc.tmpl
68 lines (54 loc) · 1.81 KB
/
dot_zshrc.tmpl
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
#setup history
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
#add local bin to path
export PATH="${ZDOTDIR:-$HOME}/bin:$PATH"
export PATH="${ZDOTDIR:-$HOME}/.local/bin:$PATH"
{{ if eq .chezmoi.os "darwin" -}}
fpath=(/opt/homebrew/share/zsh/site-functions $fpath)
export PATH="/opt/homebrew/opt/[email protected]/libexec/bin:$PATH"
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH"
export PATH="/opt/homebrew/opt/node@20/bin:$PATH"
export PATH="/opt/homebrew/opt/imagemagick@6/bin:$PATH"
export PATH="/opt/homebrew/lib/ruby/gems/3.2.0/bin:$PATH"
export PATH="/Users/jheidecker/.cargo/bin:$PATH"
{{- end -}}
#load and configure antidote
source ~/.antidote/antidote.zsh
antidote load ${ZDOTDIR:-$HOME}/.zsh_plugins.txt
#aliases
alias ls='eza --icons -hBba'
alias vi='nvim'
alias vim='nvim'
alias docker='podman'
#queue starship!
eval "$(starship init zsh)"
export KUBE_EDITOR="vim"
#macOS
bindkey '^[[A' fzf_history_search
#linux
bindkey "${key[Up]}" fzf_history_search
#zstylez
# disable sort when completing `git checkout`
zstyle ':completion:*:git-checkout:*' sort false
# set descriptions format to enable group support
zstyle ':completion:*:descriptions' format '[%d]'
# set list-colors to enable filename colorizing
zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
# preview directory's content with exa when completing cd
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
# switch group using `,` and `.`
zstyle ':fzf-tab:*' switch-group ',' '.'
#portable completions
fpath=($HOME/.zshfn $fpath)
#update nvim-lazy plugins (slow)
#nvim --headless '+Lazy! sync' +qa
{{ if eq .chezmoi.os "linux" -}}
fpath=(/usr/share/zsh/site-functions $fpath)
{{ if eq .chezmoi.osRelease.id "debian" -}}
#wezterm fix for debian12
export XCURSOR_THEME=Adwaita
{{- end -}}
{{- end -}}
export ZSH_FZF_HISTORY_SEARCH_END_OF_LINE=1