install npm pkgs globally by local prefix

This commit is contained in:
siduck76 2021-05-01 12:02:40 +05:30
parent 852a7f6b1e
commit 5e8e124b4e
1 changed files with 5 additions and 1 deletions

View File

@ -16,6 +16,8 @@ for lang in $default_lsp_langs; do
choose_langs $lang
done
npm config set prefix=~/.node_modules # for global npm pkg installation
pfx="~~~~~ "
heading() {
echo
@ -83,7 +85,7 @@ install_node_deps() {
echo "npm not installed"
return
fi
sudo npm install -g $@
npm install -g $@
}
# install languages
@ -134,6 +136,8 @@ if [[ ${warn_path} == true ]]; then
echo "Ensure ${LSP_BIN_PATH} is available in your \$PATH variable"
fi
echo "add ~/.node_modules/bin at PATH!"
# install all plugins via packer
nvim +PackerInstall