-
Notifications
You must be signed in to change notification settings - Fork 18
lazy loading node with homebrew installed nvm issues. #24
Comments
maybe prezto should incorporate https://github.com/lukechilds/zsh-nvm, which has a lazy-load mode that seems to work at least as well as prezto's built-in version |
Thanks for this issue. Would either you like to work up a pull request? @lukechilds, would you be interested in replacing what we've got with your module? I'm having trouble with nvm lazy-loading on Mac OS and would be happy to review and test. Added: The problem I'm having is #15. |
@paulmelnikow I think you can use I don't use prezto anymore, I switched to |
Ah cool, maybe someone can give that a shot. Would be great to have it integrated as an external module, especially given our nvm support is buggy. I've been following Zim, which started off as an endeavor to maintain a Prezto fork, before Matt, the author decided to rewrite it instead. It looks really promising. Technically in great shape, and also takes a smart approach of a small core. I'm curious if Matt would be interested in transitioning it to a community-managed project. There are some big advantages in what you can do when you empower and engage a community. I've also been playing around with the plugin managers. There are a lot of them! There's zplug, Antigen, and two projects (1, 2) called zpm. Why did you decide on zplug? |
Re zim, that's good to know! I hadn't seen the new organization yet. I'll have to catch up on those discussions. Interesting, a bunch of the zsh plugin managers seem to be inspired by vim plugin managers. Seems like the vim community is ahead of the game. |
I just recently tried to switch off of prezto to a zsh plugin manager, but they all had slower zsh startup times for my setup than prezto. I'll have to try zim. |
@paulmelnikow Sorry, I'm pretty busy with other projects at the moment. I'd probably recommend using a plugin manager and just using If you really want to embed it in prezto it shouldn't be a big job. You should just be able to just copy/paste the lazy load function. |
@sodiumjoe Yeah the tradeoff for the extra modularity is increased complexity in the loaders and therefore slower startup. However most modern plugin managers have some sort of caching functionality to make the difference pretty small. |
@lukechilds yeah that makes sense, though I each with all available caching and prezto was still faster. For my own personal use, I don't mess with my zsh setup that often, while I open new shells all the time, so the tradeoff doesn't really make sense. This makes me hopeful about zim, though! |
It doesn't work properly, doesn't load node from
nvm
& doesn't load globally installed modules too. Some issues I found:nvm.sh
is not inside~/.nvm
it's inside$(brew --prefix nvm)
lazy_load_nvm
gets passed$(brew --prefix nvm)
as$1
$NODE_GLOBALS
doesn't work because the versions are inside~/.nvm/versions
not inside$(brew --prefix nvm)/versions
nvm
but without$NODE_GLOBALS
Maybe this was an old behaviour that's why this script was created like this, I dunno.
For example this works for me
I'm by no means a shell expert though :)
The text was updated successfully, but these errors were encountered: