Add support for the python language server
This commit is contained in:
parent
e81499f291
commit
9e0f8b87fa
14
install.sh
14
install.sh
|
@ -2,7 +2,7 @@
|
||||||
BASE=$(git rev-parse --show-toplevel)
|
BASE=$(git rev-parse --show-toplevel)
|
||||||
LSP_BIN_PATH=$HOME/.local/bin
|
LSP_BIN_PATH=$HOME/.local/bin
|
||||||
|
|
||||||
default_lsp_langs="css html ts rust"
|
default_lsp_langs="css html ts rust python"
|
||||||
lsp_langs=${@:-"$default_lsp_langs"}
|
lsp_langs=${@:-"$default_lsp_langs"}
|
||||||
|
|
||||||
pfx="~~~~~ "
|
pfx="~~~~~ "
|
||||||
|
@ -63,6 +63,14 @@ install_node_deps () {
|
||||||
sudo npm install -g $@
|
sudo npm install -g $@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_python_deps () {
|
||||||
|
if [[ -z $(which pip) ]]; then
|
||||||
|
echo "python/pip not installed"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
sudo python3 -m pip install $@
|
||||||
|
}
|
||||||
|
|
||||||
install_ts() {
|
install_ts() {
|
||||||
install_node_deps typescript typescript-language-server prettier
|
install_node_deps typescript typescript-language-server prettier
|
||||||
}
|
}
|
||||||
|
@ -86,6 +94,10 @@ install_rust() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install_python(){
|
||||||
|
install_python_deps 'python-language-server[all]'
|
||||||
|
}
|
||||||
|
|
||||||
for lang in ${lsp_langs}; do
|
for lang in ${lsp_langs}; do
|
||||||
if fn_exists install_$lang ; then
|
if fn_exists install_$lang ; then
|
||||||
heading "Installing $lang language server"
|
heading "Installing $lang language server"
|
||||||
|
|
|
@ -32,3 +32,4 @@ buf_set_keymap("n", "<space>q", "<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>",
|
||||||
require "lspconfig".tsserver.setup {}
|
require "lspconfig".tsserver.setup {}
|
||||||
require "lspconfig".cssls.setup {}
|
require "lspconfig".cssls.setup {}
|
||||||
require "lspconfig".html.setup {}
|
require "lspconfig".html.setup {}
|
||||||
|
require "lspconfig".pyls.setup {}
|
||||||
|
|
Loading…
Reference in New Issue