diff options
author | Matthieu Coudron <teto@users.noreply.github.com> | 2021-02-23 00:02:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-23 00:02:51 +0100 |
commit | 9d5f842807c56d6265a5557cbb4bf3e951210425 (patch) | |
tree | d7c48042e7fd357cd28da0e98a723e7f5cae0ce0 /runtime/lua/vim/lsp.lua | |
parent | 46a58b74f49939c58931c79647d8ef24a160ac30 (diff) | |
download | rneovim-9d5f842807c56d6265a5557cbb4bf3e951210425.tar.gz rneovim-9d5f842807c56d6265a5557cbb4bf3e951210425.tar.bz2 rneovim-9d5f842807c56d6265a5557cbb4bf3e951210425.zip |
lsp: remove deprecated references to 'callbacks' (#13945)
vim.lsp.callbacks was deprecated a few months ago. This is a cleanup before the release.
Use vim.lsp.handlers instead.
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r-- | runtime/lua/vim/lsp.lua | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua index 0c8d0bdc95..143909fe41 100644 --- a/runtime/lua/vim/lsp.lua +++ b/runtime/lua/vim/lsp.lua @@ -16,10 +16,7 @@ local validate = vim.validate local lsp = { protocol = protocol; - -- TODO(tjdevries): Add in the warning that `callbacks` is no longer supported. - -- util.warn_once("vim.lsp.callbacks is deprecated. Use vim.lsp.handlers instead.") handlers = default_handlers; - callbacks = default_handlers; buf = require'vim.lsp.buf'; diagnostic = require'vim.lsp.diagnostic'; @@ -219,8 +216,6 @@ local function validate_client_config(config) } validate { root_dir = { config.root_dir, is_dir, "directory" }; - -- TODO(remove-callbacks) - callbacks = { config.callbacks, "t", true }; handlers = { config.handlers, "t", true }; capabilities = { config.capabilities, "t", true }; cmd_cwd = { config.cmd_cwd, optional_validator(is_dir), "directory" }; @@ -235,13 +230,6 @@ local function validate_client_config(config) flags = { config.flags, "t", true }; } - -- TODO(remove-callbacks) - if config.handlers and config.callbacks then - error(debug.traceback( - "Unable to configure LSP with both 'config.handlers' and 'config.callbacks'. Use 'config.handlers' exclusively." - )) - end - local cmd, cmd_args = lsp._cmd_parts(config.cmd) local offset_encoding = valid_encodings.UTF16 if config.offset_encoding then @@ -473,8 +461,7 @@ function lsp.start_client(config) local client_id = next_client_id() - -- TODO(remove-callbacks) - local handlers = config.handlers or config.callbacks or {} + local handlers = config.handlers or {} local name = config.name or tostring(client_id) local log_prefix = string.format("LSP[%s]", name) @@ -573,8 +560,6 @@ function lsp.start_client(config) offset_encoding = offset_encoding; config = config; - -- TODO(remove-callbacks) - callbacks = handlers; handlers = handlers; -- for $/progress report messages = { name = name, messages = {}, progress = {}, status = {} } |