Skip to content

Commit 0262540

Browse files
authored
Merge pull request #3 from varp/migrating-to-zinit
config for zinit
2 parents 608fcf4 + 539b141 commit 0262540

File tree

2 files changed

+36
-42
lines changed

2 files changed

+36
-42
lines changed

dotfiles/zshrc

Lines changed: 34 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ source "$HOME/.shell/aliases"
77
source "$HOME/.shell/xvm"
88

99
##
10-
## OhMyZsh
10+
## zinit
1111
##
12-
export ZSH="$HOME/.oh-my-zsh"
13-
export KEEP_ZSHRC="yes"
14-
[[ -d "$ZSH" && -f "$ZSH/oh-my-zsh.sh" ]] || sh -c "$(
15-
export KEEP_ZSHRC=$KEEP_ZSHRC
16-
curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh
17-
)"
12+
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
13+
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)"
14+
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
15+
source "${ZINIT_HOME}/zinit.zsh"
1816

1917
# Set name of the theme to load --- if set to "random", it will
2018
# load a random theme each time oh-my-zsh is loaded, in which case,
@@ -71,33 +69,29 @@ DISABLE_UNTRACKED_FILES_DIRTY="true"
7169

7270
ZSH_DISABLE_COMPFIX=true
7371

74-
# Which plugins would you like to load?
75-
# Standard plugins can be found in ~/.oh-my-zsh/plugins/*
76-
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
77-
# Example format: plugins=(rails git textmate ruby lighthouse)
78-
# Add wisely, as too many plugins slow down shell startup.
79-
plugins=(
80-
git
81-
pyenv
82-
dotenv
83-
sudo
84-
golang
85-
common-aliases
86-
dash
87-
pyenv
88-
nvm
89-
colored-man-pages
90-
systemd
91-
themes
92-
composer
93-
perms
94-
docker
95-
docker-compose
96-
kubectl
97-
# globalias
98-
)
99-
100-
source "$ZSH/oh-my-zsh.sh"
72+
# Plugins
73+
zinit ice as"completion"
74+
zinit snippet https://github.com/docker/cli/blob/master/contrib/completion/zsh/_docker
75+
76+
zinit snippet OMZP::git
77+
zinit snippet OMZP::pyenv
78+
zinit snippet OMZP::dotenv
79+
zinit snippet OMZP::sudo
80+
zinit snippet OMZP::golang
81+
zinit snippet OMZP::common-aliases
82+
zinit snippet OMZP::dash
83+
zinit snippet OMZP::pyenv
84+
zinit snippet OMZP::nvm
85+
zinit snippet OMZP::colored-man-pages
86+
zinit snippet OMZP::systemd
87+
zinit snippet OMZP::themes
88+
zinit snippet OMZP::perms
89+
zinit snippet OMZP::docker-compose
90+
zinit snippet OMZP::kubectl
91+
92+
zinit light zsh-users/zsh-syntax-highlighting
93+
zinit light zsh-users/zsh-autosuggestions
94+
zinit light zsh-users/zsh-completions
10195

10296
##
10397
## correct only spelling of commands
@@ -115,23 +109,23 @@ if type brew &>/dev/null; then
115109
fi
116110

117111
ZSH_COMPLETION_DIR="$HOME/.zsh_completion.d"
118-
[[ ! -d $ZSH_COMPLETION_DIR ]] && mkdir -p "$ZSH_COMPLETION_DIR"
112+
[ ! -d $ZSH_COMPLETION_DIR ] && mkdir -p "$ZSH_COMPLETION_DIR"
119113
FPATH="$ZSH_COMPLETION_DIR:${FPATH}"
120114
export FPATH
121115

122-
source "$HOME/.zsh_completion"
123-
124-
autoload -Uz compinit && compinit
125116
autoload -Uz bashcompinit && bashcompinit
117+
autoload -Uz compinit && compinit
118+
119+
[ -f "$HOME/.zsh_completion" ] && source "$HOME/.zsh_completion"
126120

127121
##
128122
## starship
129123
##
130-
[[ -f "/usr/local/bin/starship" ]] || curl -sS https://starship.rs/install.sh | sh
124+
[ -f "/usr/local/bin/starship" ] || curl -sS https://starship.rs/install.sh | sh
131125
eval "$(starship init zsh)"
132126

133127
### custom config which should not be synced with git
134-
[[ -f "$HOME/.zshrc_profile" ]] && source "$HOME/.zshrc_profile"
128+
[ -f "$HOME/.zshrc_profile" ] && source "$HOME/.zshrc_profile"
135129

136130
##
137131
## PATH without duplicates

vscode/settings.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@
9898
},
9999
"editor.inlineSuggest.syntaxHighlightingEnabled": true,
100100
// for catppuccin theme: we try to make semantic highlighting look good
101-
"editor.semanticHighlighting.enabled": true,
101+
"editor.semanticHighlighting.enabled": false,
102102
//
103103
// workbench
104104
//
105105
"workbench.editor.closeOnFileDelete": true,
106106
"workbench.editor.revealIfOpen": true,
107-
"workbench.iconTheme": "catppuccin-frappe",
107+
"workbench.iconTheme": "catppuccin-latte",
108108
"workbench.list.openMode": "singleClick",
109109
"workbench.preferredDarkColorTheme": "Catppuccin Frappé",
110110
"workbench.preferredLightColorTheme": "Catppuccin Latte",

0 commit comments

Comments
 (0)