fix(nvm): add node v22.14.0 to PATH directly for LSP compatibility
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
# NVM lazy loading (speeds up shell startup significantly)
|
||||
# NVM setup
|
||||
export NVM_DIR="$HOME/.nvm"
|
||||
|
||||
# Add default node to PATH (for child processes and immediate use)
|
||||
export PATH="$NVM_DIR/versions/node/v22.14.0/bin:$PATH"
|
||||
|
||||
# Lazy load nvm command only (node/npm/npx work directly from PATH)
|
||||
nvm() {
|
||||
unset -f nvm node npm npx
|
||||
unset -f nvm
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
||||
nvm "$@"
|
||||
}
|
||||
node() { nvm; unset -f node; node "$@"; }
|
||||
npm() { nvm; unset -f npm; npm "$@"; }
|
||||
npx() { nvm; unset -f npx; npx "$@"; }
|
||||
|
||||
Reference in New Issue
Block a user