lukechilds / zsh-nvm

Zsh plugin for installing, updating and loading nvm
MIT License
2.24k stars 113 forks source link

lazy loading causes delay on every command w/ spaceship-prompt theme #77

Open diminutivesloop opened 3 years ago

diminutivesloop commented 3 years ago

When I have NVM_LAZY_LOAD enabled I experience a several second delay after every command I run before the prompt returns. This appears to be caused by the spaceship prompt attempting to determine the current Node.js version when it detects a Node.js project in the current directory. I understand why lazy loading is triggered in this case, but I don’t get why it’s happening every time I run a command. Isn’t lazy loading only supposed to happen once per session?