Created
July 21, 2024 12:35
-
-
Save tarunmahe/fb00cc1fb08c79c7e5a830231fb51dc9 to your computer and use it in GitHub Desktop.
Zinit Setp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then | |
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" | |
fi | |
# Fix Locale | |
export LANG="en_US.UTF-8" | |
export LC_ALL="en_US.UTF-8" | |
# History | |
export HISTFILE="$HOME/.zsh_history" | |
export HISTSIZE=10000 | |
export SAVEHIST=$HISTSIZE | |
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git" | |
[ ! -d $ZINIT_HOME ] && mkdir -p "$(dirname $ZINIT_HOME)" | |
[ ! -d $ZINIT_HOME/.git ] && git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME" | |
source "${ZINIT_HOME}/zinit.zsh" | |
zinit light romkatv/powerlevel10k | |
### Added by Zinit's installer | |
# Load the pure theme, with zsh-async library that's bundled with it. | |
zi ice pick"async.zsh" src"pure.zsh" | |
zi light sindresorhus/pure | |
# A glance at the new for-syntax – load all of the above | |
# plugins with a single command. For more information see: | |
# https://zdharma-continuum.github.io/zinit/wiki/For-Syntax/ | |
zinit for \ | |
light-mode \ | |
zsh-users/zsh-autosuggestions \ | |
light-mode \ | |
zdharma-continuum/fast-syntax-highlighting \ | |
zdharma-continuum/history-search-multi-word \ | |
light-mode \ | |
pick"async.zsh" \ | |
src"pure.zsh" \ | |
sindresorhus/pure | |
# Binary release in archive, from GitHub-releases page. | |
# After automatic unpacking it provides program "fzf". | |
zi ice from"gh-r" as"program" | |
zi light junegunn/fzf | |
zi ice \ | |
as"program" \ | |
atclone"rm -f src/auto/config.cache; ./configure" \ | |
atpull"%atclone" \ | |
make \ | |
pick"src/vim" | |
zi light vim/vim | |
# Scripts built at install (there's single default make target, "install", | |
# and it constructs scripts by `cat'ing a few files). The make'' ice could also be: | |
# `make"install PREFIX=$ZPFX"`, if "install" wouldn't be the only default target. | |
zi ice as"program" pick"$ZPFX/bin/git-*" make"PREFIX=$ZPFX" | |
zi light tj/git-extras | |
#zinit ice as"command" from"gh-r" \ | |
# atclone"./starship init zsh > init.zsh; ./starship completions zsh > _starship" \ | |
# atpull"%atclone" src"init.zsh" | |
#zinit light starship/starship | |
# Plugin history-search-multi-word loaded with investigating. | |
zinit load zdharma-continuum/history-search-multi-word | |
# Two regular plugins loaded without investigating. | |
zinit light zsh-users/zsh-autosuggestions | |
zinit light zdharma-continuum/fast-syntax-highlighting | |
# Handle Acompletions without loading any plugin; see "completions" command. | |
# This one is to be ran just once, in interactive session. | |
#zi creinstall %HOME/my_completions | |
# For GNU ls (the binaries can be gls, gdircolors, e.g. on OS X when installing the | |
# coreutils package from Homebrew; you can also use https://github.com/ogham/exa) | |
zi ice atclone"dircolors -b LS_COLORS > c.zsh" atpull'%atclone' pick"c.zsh" nocompile'!' | |
zi light trapd00r/LS_COLORS | |
### Added by Zinit's installer | |
if [[ ! -f $HOME/.local/share/zinit/zinit.git/zinit.zsh ]]; then | |
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}zdharma-continuum/zinit%F{220})…%f" | |
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" && \ | |
print -P "%F{33} %F{34}Installation successful.%f%b" || \ | |
print -P "%F{160} The clone has failed.%f%b" | |
fi | |
source "$HOME/.local/share/zinit/zinit.git/zinit.zsh" | |
autoload -Uz _zinit | |
(( ${+_comps} )) && _comps[zinit]=_zinit | |
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment