aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorMichael Lingelbach <m.j.lbach@gmail.com>2021-01-15 10:31:37 -0800
committerGitHub <noreply@github.com>2021-01-15 10:31:37 -0800
commit325fb3f1635b4ed5b3ae37eb423eab53fe805b2e (patch)
treedee53ca0dbaf4c0941ebdbf28554cd93c7fb40db /lua
parentMerge pull request #670 from mjlbach/add_executable_check (diff)
parentremove deprecated handlers that were moved to neovim core (diff)
downloadnvim-lspconfig-325fb3f1635b4ed5b3ae37eb423eab53fe805b2e.tar
nvim-lspconfig-325fb3f1635b4ed5b3ae37eb423eab53fe805b2e.tar.gz
nvim-lspconfig-325fb3f1635b4ed5b3ae37eb423eab53fe805b2e.tar.bz2
nvim-lspconfig-325fb3f1635b4ed5b3ae37eb423eab53fe805b2e.tar.lz
nvim-lspconfig-325fb3f1635b4ed5b3ae37eb423eab53fe805b2e.tar.xz
nvim-lspconfig-325fb3f1635b4ed5b3ae37eb423eab53fe805b2e.tar.zst
nvim-lspconfig-325fb3f1635b4ed5b3ae37eb423eab53fe805b2e.zip
Merge pull request #509 from mjlbach/remove_deprecated_handlers
Remove deprecated handlers
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 7da5c6ef..ddef845b 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 607fbad8..16602e04 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!"}