aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-01-06 22:26:25 -0800
committerMichael Lingelbach <m.j.lbach@gmail.com>2021-01-08 14:43:36 -0800
commit115f50aa937661c2e0c98a1fc5cf617486160f92 (patch)
treebb0883d9e49d53812e9db8ceb4ae445edb3454f0 /lua
parentMerge pull request #560 from mjlbach/readme_tweaks (diff)
downloadnvim-lspconfig-115f50aa937661c2e0c98a1fc5cf617486160f92.tar
nvim-lspconfig-115f50aa937661c2e0c98a1fc5cf617486160f92.tar.gz
nvim-lspconfig-115f50aa937661c2e0c98a1fc5cf617486160f92.tar.bz2
nvim-lspconfig-115f50aa937661c2e0c98a1fc5cf617486160f92.tar.lz
nvim-lspconfig-115f50aa937661c2e0c98a1fc5cf617486160f92.tar.xz
nvim-lspconfig-115f50aa937661c2e0c98a1fc5cf617486160f92.tar.zst
nvim-lspconfig-115f50aa937661c2e0c98a1fc5cf617486160f92.zip
remove deprecated handlers that were moved to neovim core
Diffstat (limited to 'lua')
-rw-r--r--lua/lspconfig/configs.lua36
-rw-r--r--lua/lspconfig/util.lua10
2 files changed, 0 insertions, 46 deletions
diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua
index d1b0090d..242d96f4 100644
--- a/lua/lspconfig/configs.lua
+++ b/lua/lspconfig/configs.lua
@@ -35,23 +35,6 @@ function configs.__newindex(t, config_name, config_def)
-- which is why this is a function, so that it can refer to the settings
-- object on the server.
local function add_handlers(config)
- assert(not config.callbacks, "lsp.callbacks has been obsoleted. See here for more: https://github.com/neovim/neovim/pull/12655")
- config.handlers["window/logMessage"] = function(err, method, params, client_id)
- if params and params.type <= config.log_level then
- -- TODO(ashkan) remove this after things have settled.
- assert(lsp.handlers["window/logMessage"], "Handler for window/logMessage notification is not defined")
- lsp.handlers["window/logMessage"](err, method, params, client_id)
- end
- end
-
- config.handlers["window/showMessage"] = function(err, method, params, client_id)
- if params and params.type <= config.message_level then
- -- TODO(ashkan) remove this after things have settled.
- assert(lsp.handlers["window/showMessage"], "Handler for window/showMessage notification is not defined")
- lsp.handlers["window/showMessage"](err, method, params, client_id)
- 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( [[
@@ -64,25 +47,6 @@ function configs.__newindex(t, config_name, config_def)
}
end
- config.handlers["workspace/configuration"] = function(err, method, params, client_id)
- if err then error(tostring(err)) end
- if not params.items then
- return {}
- end
-
- local result = {}
- for _, item in ipairs(params.items) do
- if item.section then
- local value = util.lookup_section(config.settings, item.section) or vim.NIL
- -- For empty sections with no explicit '' key, return settings as is
- if value == vim.NIL and item.section == '' then
- value = config.settings or vim.NIL
- end
- table.insert(result, value)
- end
- end
- return result
- end
end
function M.setup(config)
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua
index d218b25d..68f5cee2 100644
--- a/lua/lspconfig/util.lua
+++ b/lua/lspconfig/util.lua
@@ -87,16 +87,6 @@ function M.nvim_multiline_command(command)
end
end
-function M.lookup_section(settings, section)
- for part in vim.gsplit(section, '.', true) do
- settings = settings[part]
- if not settings then
- return
- end
- end
- return settings
-end
-
function M.create_module_commands(module_name, commands)
for command_name, def in pairs(commands) do
local parts = {"command!"}