diff options
| author | Iron_E <code.iron.e@gmail.com> | 2020-11-14 17:13:34 -0500 |
|---|---|---|
| committer | Iron_E <code.iron.e@gmail.com> | 2020-11-15 02:21:46 -0500 |
| commit | f1a7929dec51ed8404a3ddd7193f73011cd21d98 (patch) | |
| tree | 185a5810d25de1b7d128a1216b1c3a3d5b3b6fff /lua/lspconfig/configs.lua | |
| parent | Move no callbacks assertion to outer scope (diff) | |
| download | nvim-lspconfig-f1a7929dec51ed8404a3ddd7193f73011cd21d98.tar nvim-lspconfig-f1a7929dec51ed8404a3ddd7193f73011cd21d98.tar.gz nvim-lspconfig-f1a7929dec51ed8404a3ddd7193f73011cd21d98.tar.bz2 nvim-lspconfig-f1a7929dec51ed8404a3ddd7193f73011cd21d98.tar.lz nvim-lspconfig-f1a7929dec51ed8404a3ddd7193f73011cd21d98.tar.xz nvim-lspconfig-f1a7929dec51ed8404a3ddd7193f73011cd21d98.tar.zst nvim-lspconfig-f1a7929dec51ed8404a3ddd7193f73011cd21d98.zip | |
Put assertion within function scope
Diffstat (limited to 'lua/lspconfig/configs.lua')
| -rw-r--r-- | lua/lspconfig/configs.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/lua/lspconfig/configs.lua b/lua/lspconfig/configs.lua index 730b3abf..8237d0f8 100644 --- a/lua/lspconfig/configs.lua +++ b/lua/lspconfig/configs.lua @@ -30,13 +30,11 @@ 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. local function add_handlers(config) + assert(not lsp.callbacks, "lsp.callbacks has been deprecated. 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. |
