-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.zshrc
118 lines (89 loc) · 2.71 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
# vim like
bindkey -v
if [ -e /opt/homebrew/bin/brew ]; then
export PATH=$PATH:/opt/homebrew/bin
fi
# aliases
source ~/.zsh_alias
# asdf
. "$HOME/.asdf/asdf.sh"
. "$HOME/.asdf/completions/asdf.bash"
# zsh基本設定
export LANG=ja_JP.UTF-8
HISTFILE=~/.zsh_history
HISTSIZE=1000000
SAVEHIST=1000000
# brewでインスコしたやつのzsh補完リンク設定
fpath=($(brew --prefix)/share/zsh/site-functions $fpath)
autoload -Uz compinit && compinit
# zsh: no matches found対策
setopt nonomatch
# cd無しでcd
setopt auto_cd
# cdでタブするとディレクトリ一覧を表示
setopt auto_pushd
# UTF-8環境での日本語対応
setopt print_eight_bit
# スペルチェック(nyae)禁止
unsetopt correct_all
# 補完候補を詰める
setopt list_packed
# カッコの補完
setopt auto_param_keys
# ディレクトリ名補完で末尾にスラッシュを付与
setopt auto_param_slash
# プログラム関連の設定をロード
if [ -e ~/.zsh_program ]; then
source ~/.zsh_program
fi
# その端末固有の設定をロードする
if [ -e ~/.zsh_local ]; then
source ~/.zsh_local
fi
# プロンプトの設定
autoload -Uz vcs_info
zstyle ':vcs_info:*' formats '(%s)-[%b]'
zstyle ':vcs_info:*' actionformats '(%s)-[%b|%a]'
precmd () {
psvar=()
LANG=en_US.UTF-8 vcs_info
[[ -n "$vcs_info_msg_0_" ]] && psvar[1]="$vcs_info_msg_0_"
}
autoload colors
colors
P_CDIR="%B%F{cyan}%~%f%b"
P_INFO="%F{magenta}stormcat24%f@%F{yellow}$HOST%f"
P_VCS="%F{green}%1v%f"
PROMPT="
($P_CDIR) $P_VCS
$P_INFO $ "
# 補完関数の表示を強化する
zstyle ':completion:*' verbose yes
zstyle ':completion:*' completer _expand _complete _match _prefix _approximate _list _history
zstyle ':completion:*:cd:*' ignore-parents parent pwd
zstyle ':completion:*:messages' format '%F{YELLOW}%d'$DEFAULT
zstyle ':completion:*:warnings' format '%F{RED}No matches for:''%F{YELLOW} %d'$DEFAULT
zstyle ':completion:*:descriptions' format '%F{YELLOW}completing %B%d%b'$DEFAULT
zstyle ':completion:*:options' description 'yes'
zstyle ':completion:*:descriptions' format '%F{yellow}Completing %B%d%b%f'$DEFAULT
# マッチ種別を別々に表示
zstyle ':completion:*' group-name ''
# セパレータを設定する
zstyle ':completion:*' list-separator '-->'
zstyle ':completion:*:manuals' separate-sections true
# peco
if [ -e ~/.zsh_peco ]; then
source ~/.zsh_peco
fi
export TERM='xterm-256color'
# XDG
export XDG_CONFIG_HOME="$HOME/.config"
# editor
export EDITOR='nvim'
# direnv(requires EDITOR)
eval "$(direnv hook zsh)"
# starship
eval "$(starship init zsh)"
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
export SDKMAN_DIR="$HOME/.sdkman"
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"