|
|
@ -80,23 +80,20 @@ need_cmd() { |
|
|
|
|
|
|
|
check_cmd() { |
|
|
|
if ! type "$1" &> /dev/null; then |
|
|
|
log_error "Need '$1' (command not found)" |
|
|
|
exit 1 |
|
|
|
log_warn "Need '$1' (command not found)" |
|
|
|
fi |
|
|
|
} |
|
|
|
|
|
|
|
check_all() { |
|
|
|
# Install Doom Nvim (see also git) |
|
|
|
check_cmd 'curl' |
|
|
|
need_cmd 'curl' |
|
|
|
# Clone repositories and install Doom Nvim |
|
|
|
check_cmd 'git' |
|
|
|
need_cmd 'git' |
|
|
|
# Generate help tags |
|
|
|
check_cmd 'ctags' |
|
|
|
# Install LanguageServerProtocols |
|
|
|
check_cmd 'npm' |
|
|
|
check_cmd 'node' |
|
|
|
# Plugins configurations |
|
|
|
check_cmd 'lua' |
|
|
|
} |
|
|
|
|
|
|
|
check_requirements() { |
|
|
@ -117,13 +114,6 @@ check_requirements() { |
|
|
|
log_warn "Check requirements : nvim" |
|
|
|
fi |
|
|
|
|
|
|
|
# Check if lua is installed again |
|
|
|
if hash "lua" &> /dev/null; then |
|
|
|
log_success "Check requirements : lua" |
|
|
|
else |
|
|
|
log_warn "Check requirements : lua" |
|
|
|
fi |
|
|
|
|
|
|
|
# Check if nodejs and npm are installed again, |
|
|
|
# we do not check only nodejs because some Linux distributions |
|
|
|
# installs nodejs but not also npm |
|
|
@ -152,7 +142,7 @@ backup_neovim() { |
|
|
|
mv "$HOME/.config/nvim" "$HOME/.config/nvim_bak" |
|
|
|
log_success "Neovim backup is in $HOME/.config/nvim_bak" |
|
|
|
ln -s "$HOME/.config/doom-nvim" "$HOME/.config/nvim" |
|
|
|
log_success "Installed Doom Nvim and some demons were released, be careful!" |
|
|
|
log_success "Installed Doom Nvim and more demons were released!" |
|
|
|
fi |
|
|
|
else |
|
|
|
mkdir -p "$HOME/.config" |
|
|
|