-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
67 lines (53 loc) · 1.68 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
# PATH 設定(優先度の高いものを前に)
export PATH="$HOME/.orbstack/bin:$HOME/.local/bin:/usr/local/bin:$PATH"
# プロンプト設定
PS1="[%n@%m %~]\$ "
# 履歴設定
export HISTFILE=${HOME}/.zsh_history
export HISTSIZE=100000
export SAVEHIST=100000
setopt hist_ignore_dups
setopt EXTENDED_HISTORY
# 全履歴を表示する関数
function history-all { history -E 1 }
# goenv 設定
export GOENV_ROOT="$HOME/.goenv"
export PATH="$GOENV_ROOT/bin:$PATH"
eval "$(goenv init -)"
# Go のバイナリがあるディレクトリを PATH に追加
export PATH=$(go env GOPATH)/bin:$PATH
# Git プロンプト情報
autoload -Uz vcs_info
setopt prompt_subst
zstyle ':vcs_info:git:*' check-for-changes true
zstyle ':vcs_info:git:*' stagedstr "%F{yellow}!"
zstyle ':vcs_info:git:*' unstagedstr "%F{red}+"
zstyle ':vcs_info:*' formats "%F{green}%c%u[%b]%f"
zstyle ':vcs_info:*' actionformats '[%b|%a]'
precmd () { vcs_info }
RPROMPT=$RPROMPT'${vcs_info_msg_0_}'
# コマンド補完の最適化(キャッシュを有効化)
autoload -Uz compinit
if [[ -f ~/.zcompdump ]]; then
compinit -C
else
compinit
fi
# direnv 設定
export EDITOR=vim
eval "$(direnv hook zsh)"
# volta 設定
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"
# PostgreSQL 設定
export PATH="/opt/homebrew/opt/postgresql@15/bin:$PATH"
# zsh-autosuggestions(補完機能)
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
# zplug 設定
export ZPLUG_HOME=/opt/homebrew/opt/zplug
source $ZPLUG_HOME/init.zsh
# enhancd(ディレクトリ移動支援ツール)
zplug "b4b4r07/enhancd", use:init.sh
export ENHANCD_FILTER="/usr/local/bin/peco"
# zplug をロード
zplug load --verbose