diff options
| author | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-10-08 22:14:00 +0200 |
|---|---|---|
| committer | Aleksa Vuckovic <aleksav013@gmail.com> | 2022-10-08 22:14:00 +0200 |
| commit | 9ed0950e5fd53a48430f7fdc069a71d6fdeab145 (patch) | |
| tree | ff80de268e5fe86686d690e1d4c5d7a9389cb707 | |
| parent | aa9cf3c8ce57b54a1b8f6f683437a017e7051d54 (diff) | |
pylsp + plugin updates
| -rw-r--r-- | lua/user/lsp/handlers.lua | 4 | ||||
| -rw-r--r-- | lua/user/lsp/lsp-installer.lua | 6 | ||||
| -rw-r--r-- | lua/user/lsp/settings/pylsp.lua | 1 |
3 files changed, 8 insertions, 3 deletions
diff --git a/lua/user/lsp/handlers.lua b/lua/user/lsp/handlers.lua index 5f3e493..5bc3074 100644 --- a/lua/user/lsp/handlers.lua +++ b/lua/user/lsp/handlers.lua @@ -46,7 +46,7 @@ end local function lsp_highlight_document(client) -- Set autocommands conditional on server_capabilities - if client.resolved_capabilities.document_highlight then + if client.server_capabilities.document_highlight then vim.api.nvim_exec( [[ augroup lsp_document_highlight @@ -86,7 +86,7 @@ end M.on_attach = function(client, bufnr) if client.name == "tsserver" then - client.resolved_capabilities.document_formatting = false + client.server_capabilities.document_formatting = false end lsp_keymaps(bufnr) lsp_highlight_document(client) diff --git a/lua/user/lsp/lsp-installer.lua b/lua/user/lsp/lsp-installer.lua index b284468..84ada28 100644 --- a/lua/user/lsp/lsp-installer.lua +++ b/lua/user/lsp/lsp-installer.lua @@ -1,4 +1,4 @@ -local servers = { "bashls", "texlab", "sumneko_lua" } +local servers = { "bashls", "pylsp", "texlab", "sumneko_lua" } local status, lsp_installer_servers = pcall(require, "nvim-lsp-installer.servers") if not status then @@ -42,6 +42,10 @@ lsp_installer.on_server_ready(function(server) opts = vim.tbl_deep_extend("force", sumneko_opts, opts) end + if server.name == "pylsp" then + local pylsp_opts = require("user.lsp.settings.pylsp") + opts = vim.tbl_deep_extend("force", pylsp_opts, opts) + end -- This setup() function is exactly the same as lspconfig's setup function. -- Refer to https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md diff --git a/lua/user/lsp/settings/pylsp.lua b/lua/user/lsp/settings/pylsp.lua new file mode 100644 index 0000000..a564707 --- /dev/null +++ b/lua/user/lsp/settings/pylsp.lua @@ -0,0 +1 @@ +return {} |
