vim-prettier: install node if missing

This commit is contained in:
AJ ONeal
2021-03-24 17:51:50 +00:00
parent d24c769a61
commit 1bc08d39df
+4
View File
@@ -8,6 +8,10 @@ function __init_vim_prettier() {
rm -rf "$HOME/.vim/pack/plugins/start/vim-prettier"
git clone --depth=1 https://github.com/prettier/vim-prettier.git "$HOME/.vim/pack/plugins/start/vim-prettier"
if [ -z "$(command -v node)" ]; then
export PATH="$HOME/.local/opt/node/bin:$HOME/.local/bin:${PATH}"
webi node
fi
npm install -g prettier@2
if [ ! -f "$HOME/.vimrc" ]; then