FollieHiyuki-dotfiles/home/.config/nvim/scripts/sumneko_lua.sh
2021-10-17 21:48:10 +07:00

27 lines
509 B
Bash
Executable File

#!/bin/sh -e
current_path="$PWD"
luals_path="$HOME/.local/share/nvim/lsp/lua-language-server"
# Clone / Update
if [ -d "$luals_path" ]; then
cd $luals_path
git pull --rebase
else
git clone https://github.com/sumneko/lua-language-server.git $luals_path
fi
cd $luals_path
git submodule update --init --recursive
# Build
cd 3rd/luamake
./compile/install.sh
cd ../..
./3rd/luamake/luamake rebuild
# The build process automatically exports path to `~/.profile`
rm -rf ~/.profile
cd $current_path