aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/configs.lua
diff options
context:
space:
mode:
authorIron_E <code.iron.e@gmail.com>2020-11-14 17:11:41 -0500
committerIron_E <code.iron.e@gmail.com>2020-11-15 02:21:46 -0500
commit26e787b70627d21b3500914534c291b5b96ecdb9 (patch)
tree428f2d979c48800ff834fa57d1851c0d5284576d /lua/lspconfig/configs.lua
parentAdd help reference for failed callback assertion (diff)
downloadnvim-lspconfig-26e787b70627d21b3500914534c291b5b96ecdb9.tar
nvim-lspconfig-26e787b70627d21b3500914534c291b5b96ecdb9.tar.gz
nvim-lspconfig-26e787b70627d21b3500914534c291b5b96ecdb9.tar.bz2
nvim-lspconfig-26e787b70627d21b3500914534c291b5b96ecdb9.tar.lz
nvim-lspconfig-26e787b70627d21b3500914534c291b5b96ecdb9.tar.xz
nvim-lspconfig-26e787b70627d21b3500914534c291b5b96ecdb9.tar.zst
nvim-lspconfig-26e787b70627d21b3500914534c291b5b96ecdb9.zip
Move no callbacks assertion to outer scope
Diffstat (limited to 'lua/lspconfig/configs.lua')
-rw-r--r--lua/lspconfig/configs.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua
index cf0c7d4d..730b3abf 100644
--- a/lua/lspconfig/configs.lua
+++ b/lua/lspconfig/configs.lua
@@ -30,6 +30,9 @@ function configs.__newindex(t, config_name, config_def)
-- Force this part.
default_config.name = config_name
+ -- Ensure that there are no callbacks registered.
+ assert(not lsp.callbacks, "lsp.callbacks has been deprecated. See here for more: https://github.com/neovim/neovim/pull/12655")
+
-- The config here is the one which will be instantiated for the new server,
-- which is why this is a function, so that it can refer to the settings
-- object on the server.
@@ -37,7 +40,6 @@ function configs.__newindex(t, config_name, config_def)
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(not lsp.callbacks, "lsp.callbacks has been deprecated. See here for more: https://github.com/nvim-lua/diagnostic-nvim/issues/73")
assert(lsp.handlers["window/logMessage"], "Handler for window/logMessage notification is not defined")
lsp.handlers["window/logMessage"](err, method, params, client_id)
end