replace pyls with pyright
This commit is contained in:
parent
58443f6d97
commit
f5c59c574a
20
install.sh
20
install.sh
@ -7,14 +7,12 @@ lsp_langs=""
|
||||
|
||||
choose_langs() {
|
||||
read -p "Would you like to install $1 lsp?(y/n)" lang
|
||||
if [ "$lang" = "y" ]
|
||||
then
|
||||
if [ "$lang" = "y" ]; then
|
||||
lsp_langs+="$1 "
|
||||
fi
|
||||
}
|
||||
|
||||
for lang in $default_lsp_langs
|
||||
do
|
||||
for lang in $default_lsp_langs; do
|
||||
choose_langs $lang
|
||||
done
|
||||
|
||||
@ -30,7 +28,7 @@ get_platform() {
|
||||
Darwin*) platform=Mac ;;
|
||||
CYGWIN*) platform=Cygwin ;;
|
||||
MINGW*) platform=MinGw ;;
|
||||
*) platform="UNKNOWN:${unameOut}"
|
||||
*) platform="UNKNOWN:${unameOut}" ;;
|
||||
esac
|
||||
echo $platform
|
||||
}
|
||||
@ -83,14 +81,6 @@ install_node_deps () {
|
||||
sudo npm install -g $@
|
||||
}
|
||||
|
||||
install_python_deps () {
|
||||
if [[ -z $(which pip) && -z $(which pip3) ]]; then
|
||||
echo "python/pip not installed"
|
||||
return
|
||||
fi
|
||||
sudo python3 -m pip install $@
|
||||
}
|
||||
|
||||
install_ts() {
|
||||
install_node_deps typescript typescript-language-server prettier
|
||||
}
|
||||
@ -115,7 +105,7 @@ install_rust() {
|
||||
}
|
||||
|
||||
install_python() {
|
||||
install_python_deps 'python-language-server[all]'
|
||||
install_node_deps pyright
|
||||
}
|
||||
|
||||
for lang in ${lsp_langs}; do
|
||||
@ -128,7 +118,7 @@ for lang in ${lsp_langs}; do
|
||||
fi
|
||||
done
|
||||
|
||||
if [[ ${warn_path} = true ]]; then
|
||||
if [[ ${warn_path} == true ]]; then
|
||||
echo ""
|
||||
echo "Ensure ${LSP_BIN_PATH} is available in your \$PATH variable"
|
||||
fi
|
||||
|
@ -39,7 +39,7 @@ function on_attach(client)
|
||||
end
|
||||
end
|
||||
|
||||
local servers = {"tsserver", "cssls", "html" , "pyls"}
|
||||
local servers = {"tsserver", "cssls", "html" , "pyright"}
|
||||
for _, lsp in ipairs(servers) do
|
||||
nvim_lsp[lsp].setup {on_attach = on_attach}
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user