diff --git a/install.sh b/install.sh index 9307287..938da78 100755 --- a/install.sh +++ b/install.sh @@ -2,7 +2,7 @@ BASE=$(git rev-parse --show-toplevel) 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"} pfx="~~~~~ " @@ -63,6 +63,14 @@ install_node_deps () { 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_node_deps typescript typescript-language-server prettier } @@ -86,6 +94,10 @@ install_rust() { fi } +install_python(){ + install_python_deps 'python-language-server[all]' +} + for lang in ${lsp_langs}; do if fn_exists install_$lang ; then heading "Installing $lang language server" diff --git a/lua/nvim-lspconfig/lua.lua b/lua/nvim-lspconfig/lua.lua index 98ba1ae..b77f9e8 100644 --- a/lua/nvim-lspconfig/lua.lua +++ b/lua/nvim-lspconfig/lua.lua @@ -36,9 +36,7 @@ function on_attach(client) end -local servers = { "tsserver" } +local servers = { "tsserver", "cssls", "pyls", "html" } for _, lsp in ipairs(servers) do nvim_lsp[lsp].setup { on_attach = on_attach } -end - - +end \ No newline at end of file