diff options
| -rw-r--r-- | lua/lspconfig/configs.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua index 1a844c85..d1b0090d 100644 --- a/lua/lspconfig/configs.lua +++ b/lua/lspconfig/configs.lua @@ -1,3 +1,4 @@ +local log = require 'vim.lsp.log' local util = require 'lspconfig/util' local api, validate, lsp = vim.api, vim.validate, vim.lsp local tbl_extend = vim.tbl_extend @@ -51,6 +52,18 @@ function configs.__newindex(t, config_name, config_def) end end + -- pyright and jdtls ignore dynamicRegistration settings and sent client/registerCapability handler which are unhandled + config.handlers['client/registerCapability'] = function(_, _, _, _) + log.warn(string.format( [[ + The language server %s incorrectly triggers a registerCapability handler + despite dynamicRegistration set to false. Please report upstream. + ]] , config.name)) + return { + result = nil; + error = nil; + } + end + config.handlers["workspace/configuration"] = function(err, method, params, client_id) if err then error(tostring(err)) end if not params.items then |
