-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdot_zsh_plugins
More file actions
90 lines (78 loc) · 3.38 KB
/
Copy pathdot_zsh_plugins
File metadata and controls
90 lines (78 loc) · 3.38 KB
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
#!/bin/zsh
# zinit bootstrap
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then
command mkdir -p "$HOME/.local/share/zinit" && command chmod g-rwX "$HOME/.local/share/zinit"
command git clone https://github.com/zdharma-continuum/zinit "$HOME/.local/share/zinit/zinit.git"
fi
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh"
# autoload -Uz _zinit
# (( ${+_comps} )) && _comps[zinit]=_zinit
# disable zi alias
alias -L zi &>/dev/null && unalias zi
# zinit annex
zinit light-mode for \
zdharma-continuum/zinit-annex-binary-symlink \
zdharma-continuum/zinit-annex-patch-dl \
zdharma-continuum/fast-syntax-highlighting \
zsh-users/zsh-completions \
zsh-users/zsh-autosuggestions
FAST_HIGHLIGHT_STYLES[path-to-dir]='fg=magenta'
# FZF
export FZF_DEFAULT_COMMAND='fd --type f --color never'
export FZF_DEFAULT_OPTS='--color=bg+:-1,bg:-1 --style minimal --prompt="❯ " --gutter=" " --height=30%'
export FZF_CTRL_T_COMMAND='fd --type f --color never'
export FZF_ALT_C_COMMAND='fd --type d --color never'
zinit lucid from"gh-r" as"null" for lbin"**/fzf" @junegunn/fzf
zinit for https://raw.githubusercontent.com/junegunn/fzf/master/shell/key-bindings.zsh
# Prompt
export STARSHIP_CONFIG=$HOME/.config/starship/config.toml
zinit lucid from"gh-r" as"null" for bpick"*linux*musl*" lbin"**/starship" @starship/starship
eval "$(starship init zsh)"
# Autojump
export _ZO_FZF_OPTS=$FZF_DEFAULT_OPTS
zinit lucid from"gh-r" as"null" for completions bpick"*linux*musl*" lbin"**/zoxide" @ajeetdsouza/zoxide
eval "$(zoxide init zsh)"
# BAT-MAN
export MANPAGER="sh -c 'awk '\''{ gsub(/\x1B\[[0-9;]*m/, \"\", \$0); gsub(/.\x08/, \"\", \$0); print }'\'' | bat -p -lman'"
# CLI Tools
zinit lucid from"gh-r" as"null" for bpick"*linux*musl*" lbin"**/tealdeer* -> tldr" @tealdeer-rs/tealdeer
zinit lucid from"gh-r" as"null" for bpick"*linux*musl*" lbin"**/delta" @dandavison/delta
zinit lucid from"gh-r" as"null" atload"alias ls=lsd" for bpick"*linux*musl*" lbin"**/lsd" @lsd-rs/lsd
zinit lucid from"gh-r" as"null" for bpick"*linux*musl*" lbin"**/dust" @bootandy/dust
zinit lucid from"gh-r" as"null" for lbin"**/duf" @muesli/duf
zinit lucid from"gh-r" as"null" for bpick"*linux*musl*" lbin"**/fd" @sharkdp/fd
zinit lucid from"gh-r" as"null" for bpick"*linux*musl*" lbin"**/hexyl" @sharkdp/hexyl
zinit lucid from"gh-r" as"null" for bpick"*linux*musl*" lbin"**/bat" @sharkdp/bat
zinit lucid from"gh-r" as"null" for bpick"*linux*musl*" lbin"**/sd" @chmln/sd
zinit lucid from"gh-r" as"null" for bpick"*linux*musl*" lbin"**/rg" @burntsushi/ripgrep
zinit lucid from"gh-r" as"null" for lbin"**/procs" @dalance/procs
zinit lucid from"gh-r" as"null" for lbin"**/yq* -> yq" @mikefarah/yq
zinit lucid from"gh-r" as"null" for lbin"**/jq* -> jq" @jqlang/jq
zinit lucid from"gh-r" as"null" for lbin"**/tokei* -> tokei" @xampprocky/tokei
# History
export HISTFILE=$HOME/.zsh_history
export HISTSIZE=100000
export SAVEHIST=$HISTSIZE
setopt hist_ignore_all_dups
setopt hist_reduce_blanks
setopt inc_append_history
setopt share_history
# misc
export EDITOR='nvim'
bindkey -e
bindkey -r '^_' # disable ctrl-/ for tmux
bindkey '^U' backward-kill-line
unsetopt beep
unsetopt flow_control # disable ctrl-s/q
# completion
setopt noautomenu
typeset -U fpath
fpath=(~/.zsh/completion /usr/share/zsh/vendor-completions $fpath)
autoload -Uz compinit
if [[ -n $HOME/.zcompdump(#qN.mh+24) ]]; then
compinit -u -i
else
compinit -C
fi
zinit cdreplay -q
# vim: sw=2 ts=2 et