Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use lazy laod for nvm #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@
[submodule "modules/prompt/external/powerlevel10k"]
path = modules/prompt/external/powerlevel10k
url = https://github.com/romkatv/powerlevel10k.git
[submodule "modules/lazy-load"]
path = modules/lazy-load
url = https://github.com/xcv58/zsh-lazy-load.git
1 change: 1 addition & 0 deletions modules/lazy-load
Submodule lazy-load added at f362c0
4 changes: 4 additions & 0 deletions modules/node/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
# Zeh Rizzatti <zehrizzatti@gmail.com>
#

function load_nvm() {
# Load manually installed NVM into the shell session.
if [[ -s "${NVM_DIR:=$HOME/.nvm}/nvm.sh" ]]; then
source "${NVM_DIR}/nvm.sh"
Expand Down Expand Up @@ -55,3 +56,6 @@ for compl_command in "${(k)compl_commands[@]}"; do
done

unset compl_command{s,}
}

lazy_load load_nvm nvm node npm gulp eslint yarn standard react-native npx prisma prettier
1 change: 1 addition & 0 deletions runcoms/zpreztorc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ zstyle ':prezto:*:*' color 'yes'
# Set the Prezto modules to load (browse modules).
# The order matters.
zstyle ':prezto:load' pmodule \
'lazy-load' \
'environment' \
'terminal' \
'editor' \
Expand Down