Fix install.sh
This commit is contained in:
parent
1400fc6aa3
commit
f3338f96bc
45
install.sh
45
install.sh
|
@ -34,10 +34,33 @@ for pkg in "$@"; do
|
||||||
LC_ALL="C" stow -t "$HOME" --ignore="README.md" "$pkg"
|
LC_ALL="C" stow -t "$HOME" --ignore="README.md" "$pkg"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [ -n "$NVIM" ] && [ ! -d "${XDG_DATA_HOME:-$HOME/.local/share}/nvim/site/pack/packer/start/packer.nvim" ]; then
|
||||||
|
command -v nvim >/dev/null 2>&1 ||
|
||||||
|
{ sleep 0.5;
|
||||||
|
echo "=> Installing Neovim";
|
||||||
|
$INSTALL nvim; }
|
||||||
|
|
||||||
|
sleep 0.5
|
||||||
|
echo "=> Installing packer for Neovim"
|
||||||
|
git clone --quiet --depth 1 "https://github.com/wbthomason/packer.nvim" \
|
||||||
|
"${XDG_DATA_HOME:-$HOME/.local/share}/nvim/site/pack/packer/start/packer.nvim"
|
||||||
|
echo " :: The LSP servers will be installed automatically when you open a file in Neovim."
|
||||||
|
echo " :: Please run the following Normal mode command in Neovim to install the plugins:"
|
||||||
|
echo " :PackerSync"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$DASH" ] && ! command -v dash >/dev/null 2>&1; then
|
||||||
|
sleep 0.5
|
||||||
|
echo "=> Installing Dash"
|
||||||
|
$INSTALL dash
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$ZSH" ]; then
|
if [ -n "$ZSH" ]; then
|
||||||
if ! grep -q "$(id -nu).*/zsh$" /etc/passwd; then
|
if ! grep -q "$(id -nu).*/zsh$" /etc/passwd; then
|
||||||
command -v zsh >/dev/null 2>&1 || sleep 0.5 &&
|
command -v zsh >/dev/null 2>&1 ||
|
||||||
echo "=> Installing Zsh" && $INSTALL zsh
|
{ sleep 0.5;
|
||||||
|
echo "=> Installing Zsh";
|
||||||
|
$INSTALL zsh; }
|
||||||
|
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
chsh -s /bin/zsh
|
chsh -s /bin/zsh
|
||||||
|
@ -49,23 +72,5 @@ if [ -n "$ZSH" ]; then
|
||||||
echo " $ fast-theme ~/.config/zsh/fast-theme.ini"
|
echo " $ fast-theme ~/.config/zsh/fast-theme.ini"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$NVIM" ] && [ ! -f "${XDG_DATA_HOME:-$HOME/.local/share}/nvim/site/autoload/plug.vim" ]; then
|
|
||||||
command -v nvim >/dev/null 2>&1 || sleep 0.5 &&
|
|
||||||
echo "=> Installing Neovim" && $INSTALL nvim
|
|
||||||
|
|
||||||
sleep 0.5
|
|
||||||
echo "=> Installing vim-plug and plugins for Neovim"
|
|
||||||
curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}/nvim/site/autoload/plug.vim" --create-dirs \
|
|
||||||
"https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
|
|
||||||
nvim --headless +PlugInstall +qa
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$DASH" ] && ! command -v dash >/dev/null 2>&1; then
|
|
||||||
sleep 0.5
|
|
||||||
echo "=> Installing Dash"
|
|
||||||
$INSTALL dash
|
|
||||||
fi
|
|
||||||
|
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
echo "=> Done!"
|
echo "=> Done!"
|
||||||
|
|
||||||
|
|
|
@ -14,10 +14,7 @@ require('packer').startup(function(use)
|
||||||
use {
|
use {
|
||||||
'williamboman/mason-lspconfig.nvim',
|
'williamboman/mason-lspconfig.nvim',
|
||||||
requires = {
|
requires = {
|
||||||
{
|
|
||||||
'williamboman/mason.nvim',
|
'williamboman/mason.nvim',
|
||||||
run = ':MasonUpdate'
|
|
||||||
},
|
|
||||||
'neovim/nvim-lspconfig'
|
'neovim/nvim-lspconfig'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -149,6 +146,7 @@ cmp.setup.cmdline(':', {
|
||||||
|
|
||||||
-- lsp config
|
-- lsp config
|
||||||
require('mason').setup {}
|
require('mason').setup {}
|
||||||
|
require("mason-registry").refresh()
|
||||||
require('mason-lspconfig').setup {
|
require('mason-lspconfig').setup {
|
||||||
automatic_installation = true
|
automatic_installation = true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue