-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshenv
103 lines (83 loc) · 2.77 KB
/
.zshenv
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
# Speed up init
skip_global_compinit=1
# Brew conflicts
ZSH_DISABLE_COMPFIX=true
# oh-my-zsh
ZSH_THEME="agnoster"
SOLARIZED_THEME="light"
export ZSH=$HOME/.oh-my-zsh
plugins=(git yarn npm docker)
source $ZSH/oh-my-zsh.sh
# nvim
# alias nvim-lazy="NVIM_APPNAME=nvim-lazyvim nvim"
# alias nvim-kick="NVIM_APPNAME=nvim-kickstart nvim"
alias nvim-chad="NVIM_APPNAME=nvim-nvchad nvim"
# alias nvim-astro="NVIM_APPNAME=nvim-astrovim nvim"
nv() {
# select config in lazyvim kickstart nvchad astrovim lunarvim
select config in nvchad lazyvim
do NVIM_APPNAME=nvim-$config nvim $@; break; done
}
nvims() {
# items=("default" "kickstart" "lazyvim" "nvchad" "astrovim" "lunarvim")
items=("nvchad" "lazyvim" "default" )
config=$(printf "%s\n" "${items[@]}" | fzf --prompt=" Neovim Config " --height=~50% --layout=reverse --border --exit-0)
if [[ -z $config ]]; then
echo "Nothing selected"
return 0
elif [[ $config == "default" ]]; then
config=""
fi
NVIM_APPNAME=nvim-$config nvim $@
}
bindkey -s ^a "nvims\n"
# export NVIM_APPNAME=nvim-nvchad
EDITOR="nvim"
# Aliases
. ~/dotfiles/.aliases
. ~/dotfiles/.aliases_local
# Exports
## nvm
# export NVM_DIR="$HOME/.nvm"
# [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
# [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
## volta
export VOLTA_HOME="$HOME/.volta"
export PATH="$VOLTA_HOME/bin:$PATH"
## yarn
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
## Android
export ANDROID_HOME="$HOME/Library/Android/sdk"
export PATH=$PATH:$JAVA_HOME:$ANDROID_HOME/emulator:$ANDROID_HOME/tools:$ANDROID_HOME/tools/bin:$ANDROID_HOME/emulator:$ANDROID_HOME/platform-tools:$ANDROID_HOME/cmdline-tools/version/bin:$GRADLE_HOME/bin
# Flutter
export PATH="$PATH:$HOME/development/flutter/bin"
export PATH="$PATH:$HOME/.pub-cache/bin"
## Go
export GOPATH=~/go
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
export NODE_OPTIONS="--max-old-space-size=8192"
## Ruby
eval "$(rbenv init - zsh)"
## Python
export PYENV_ROOT="$HOME/.pyenv"
# command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
## vscodium
export PATH="$PATH:/Applications/VSCodium.app/Contents/Resources/app/bin"
## gcloud cli
export CLOUDSDK_PYTHON="$(brew --prefix)/Cellar/python@3.11/3.11.7_1/bin/python3"
source "$(brew --prefix)/share/google-cloud-sdk/path.zsh.inc"
source "$(brew --prefix)/share/google-cloud-sdk/completion.zsh.inc"
# fast cd and search
eval "$(fzf --zsh)"
eval "$(zoxide init zsh)"
# yazi cd on quit
function yy() {
local tmp="$(mktemp -t "yazi-cwd.XXXXXX")"
yazi "$@" --cwd-file="$tmp"
if cwd="$(cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then
cd -- "$cwd"
fi
rm -f -- "$tmp"
}