Skip to content

Commit 69b2122

Browse files
committed
feat: swap starship for pure with zsh plugins
1 parent 2232e55 commit 69b2122

File tree

2 files changed

+31
-30
lines changed

2 files changed

+31
-30
lines changed

dotfiles/zshrc

+28-22
Original file line numberDiff line numberDiff line change
@@ -3,36 +3,42 @@ alias docker="podman"
33
alias mux="tmuxinator"
44

55
export EDITOR="nvim"
6+
export NVM_AUTO_USE=true
67

78
if [ -d "/home/linuxbrew" ]; then
89
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
910
fi
1011

11-
export NVM_DIR="$HOME/.nvm"
12-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
13-
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
12+
export ZPLUG_HOME=/usr/local/opt/zplug
13+
source $ZPLUG_HOME/init.zsh
14+
15+
zplug "zsh-users/zsh-history-substring-search"
16+
zplug "zsh-users/zsh-syntax-highlighting", defer:2
17+
zplug "catppuccin/zsh-syntax-highlighting", use:themes/catppuccin_mocha-zsh-syntax-highlighting.zsh
18+
zplug "jeffreytse/zsh-vi-mode"
19+
zplug "mafredri/zsh-async"
20+
zplug "sindresorhus/pure", use:pure.zsh, as:theme
21+
zplug "p-m-p/pure-catppuccin", use:theme.zsh
22+
zplug "lukechilds/zsh-nvm"
23+
24+
if ! zplug check --verbose; then
25+
printf "Install? [y/N]: "
26+
if read -q; then
27+
echo; zplug install
28+
fi
29+
fi
1430

15-
autoload -U add-zsh-hook
16-
load-nvmrc() {
17-
local nvmrc_path="$(nvm_find_nvmrc)"
31+
zplug load
1832

19-
if [ -n "$nvmrc_path" ]; then
20-
local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")
21-
22-
if [ "$nvmrc_node_version" = "N/A" ]; then
23-
nvm install
24-
elif [ "$nvmrc_node_version" != "$(nvm version)" ]; then
25-
nvm use
26-
fi
27-
elif [ -n "$(PWD=$OLDPWD nvm_find_nvmrc)" ] && [ "$(nvm version)" != "$(nvm version default)" ]; then
28-
echo "Reverting to nvm default version"
29-
nvm use default
30-
fi
31-
}
32-
add-zsh-hook chpwd load-nvmrc
33-
load-nvmrc
33+
bindkey '^[[A' history-substring-search-up
34+
bindkey '^[[B' history-substring-search-down
3435

3536
export SDKMAN_DIR=$(brew --prefix sdkman-cli)/libexec
3637
[[ -s "${SDKMAN_DIR}/bin/sdkman-init.sh" ]] && source "${SDKMAN_DIR}/bin/sdkman-init.sh"
3738

38-
eval "$(starship init zsh)"
39+
# pnpm
40+
export PNPM_HOME="/Users/philparsons/Library/pnpm"
41+
export PATH="$PNPM_HOME:$PATH"
42+
# pnpm end
43+
44+
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

install.sh

+3-8
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ if [ "$IS_OSX" = true ]; then
2020
. ./iterm2/install.sh
2121
fi
2222

23-
if ! type starship &> /dev/null; then
24-
echo "Installing Starship"
25-
brew install starship
23+
if ! type zplug &> /dev/null; then
24+
echo "Installing ZPlug"
25+
brew install zplug
2626
fi
2727

2828
if ! type tmux &> /dev/null; then
@@ -37,11 +37,6 @@ if ! type nvim &> /dev/null; then
3737
git clone https://github.com/p-m-p/nvim-config.git "$HOME/.config/nvim"
3838
fi
3939

40-
if [ ! -d "$HOME/.nvm" ]; then
41-
echo "Installing nvm"
42-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
43-
fi
44-
4540
if ! brew --prefix --installed sdkman-cli &> /dev/null; then
4641
echo "Installing SDKMAN"
4742
brew tap sdkman/tap

0 commit comments

Comments
 (0)