2022-01-04 20:43:30 +01:00
|
|
|
source ./scripts/common.sh
|
|
|
|
|
|
|
|
if [[ "$WITH_NEOVIM" == 'yes' ]]; then
|
|
|
|
if ! command_exists nvim; then
|
|
|
|
install_package neovim
|
|
|
|
echo '[INFO] Neovim installed'
|
2022-01-04 21:10:53 +01:00
|
|
|
|
|
|
|
if [[ "$WITH_NEOVIM_DEPENDENCIES" == 'yes' ]]; then
|
2022-01-11 22:44:01 +01:00
|
|
|
install_package ripgrep fd dart lazygit rust-analyzer lldb python-neovim ctags
|
2022-01-04 21:10:53 +01:00
|
|
|
fi
|
2022-01-04 20:43:30 +01:00
|
|
|
else
|
|
|
|
echo '[INFO] Neovim already installed'
|
|
|
|
fi
|
|
|
|
|
2022-01-04 21:32:15 +01:00
|
|
|
if [[ "$WITH_LAZYGIT_CONFIG" == 'yes' || "$WITH_LAZYGIT_CONFIG" == 'force' ]]; then
|
|
|
|
if [[ -d "$HOME/.config/lazygit" && "$WITH_LAZYGIT_CONFIG" == 'force' ]]; then
|
2022-01-04 21:06:50 +01:00
|
|
|
rm -rf "$HOME/.config/lazygit"
|
|
|
|
echo '[INFO] Lazygit config removed | Forced by environment variable'
|
|
|
|
fi
|
|
|
|
if [[ ! -d "$HOME/.config/lazygit" ]]; then
|
|
|
|
ln -s "$CWD/configs/lazygit" "$HOME/.config/lazygit"
|
|
|
|
echo "[INFO] Lazygit config linked with symbolic link : $CWD/configs/lazygit -> $HOME/.config/lazygit"
|
|
|
|
else
|
|
|
|
echo '[INFO] Lazygit config already linked'
|
|
|
|
fi
|
2022-01-04 20:51:05 +01:00
|
|
|
fi
|
2022-01-04 20:43:30 +01:00
|
|
|
|
2022-01-04 21:32:15 +01:00
|
|
|
if [[ "$WITH_NEOVIM_CONFIG" == 'yes' || "$WITH_NEOVIM_CONFIG" == 'force' ]]; then
|
|
|
|
if [[ -d "$HOME/.config/nvim" && "$WITH_NEOVIM_CONFIG" == 'force' ]]; then
|
2022-01-04 21:06:50 +01:00
|
|
|
rm -rf "$HOME/.config/nvim"
|
|
|
|
echo '[INFO] Neovim config removed | Forced by environment variable'
|
|
|
|
fi
|
|
|
|
if [[ ! -d "$HOME/.config/nvim" ]]; then
|
|
|
|
ln -s "$CWD/configs/nvim" "$HOME/.config/nvim"
|
|
|
|
echo "[INFO] Neovim config linked with symbolic link : $CWD/configs/nvim -> $HOME/.config/nvim"
|
|
|
|
else
|
|
|
|
echo '[INFO] Neovim config already linked'
|
|
|
|
fi
|
2022-01-04 20:43:30 +01:00
|
|
|
fi
|
|
|
|
else
|
|
|
|
echo '[INFO] WITH_NEOVIM not equals to yes. Ignoring...'
|
2022-01-11 22:44:01 +01:00
|
|
|
fi
|