Schniz / fnm

🚀 Fast and simple Node.js version manager, built in Rust
https://fnm.vercel.app
GNU General Public License v3.0
18.51k stars 475 forks source link

Hooks #1060

Open atwright147 opened 1 year ago

atwright147 commented 1 year ago

Would it be possible to add a hooks mechanism?

This would add hooks for various life cycle events:

Any more that might be appropriate / possible.

This would allow users to add scripts into the Fnm process and would allow for installing default packages (like in https://github.com/Schniz/fnm/issues/139) without you having to deal with the specifics of npm, pnpm, yarn etc...

I imagine that this would require adding an .fnmrc file or hardcode a folder location with hardcoded filenames (kind of like Git's hooks).

aemonge commented 3 months ago

Specially before and after setting the node environment.

In my specif case, I need to tell my neovim instance, to update LSP after node version changed