Clean up install and uninstall

This commit is contained in:
ViViDboarder 2022-02-28 16:38:45 -08:00
parent 0cb37ef1dc
commit ec6601ff2a
2 changed files with 13 additions and 10 deletions

View File

@ -20,15 +20,17 @@ install-language-servers:
.PHONY: uninstall
uninstall:
rm ~/.vimrc
rm ~/.nvimrc
rm -fr ~/.vim
rm -fr ~/.nvim
rm -fr ~/.config/nvim
.PHONY: clean
clean:
rm -fr ./vim/plugged
rm -fr ./vim/autoload/plug.vim
# Clean vim-plug
rm -fr ./vim/plugged ./vim/autoload/plug.vim
# Clean LspInstall
rm -fr ~/.local/share/nvim/lsp_servers
# Clean Packer
rm -fr ~/.local/share/nvim/site/pack/packer
# Installs pre-commit hooks
$(PRE_COMMIT_ENV):

View File

@ -24,8 +24,9 @@ mkdir -p "${XDG_CONFIG_HOME:=$HOME/.config}"
# Install all bundles
echo "Install all bundles"
if hash nvim 2>/dev/null; then
echo "If using Neovim, install the python modules in your environment"
# Install plugins for old Neovim (<0.5)
nvim --headless -c PlugInstall -c qall
# Install plugins for new Neovim (>0.5)
nvim --headless -c "autocmd User PackerComplete quitall" -c "PackerBootstrap" -c "PackerSync"
nvim --headless -c "lua require('plugins.treesitter').bootstrap()" -c quitall
nvim --headless -c "TSUpdateSync" -c "quitall"