diff options
| author | Jan <jan.hafer@rwth-aachen.de> | 2020-01-29 19:39:30 +0100 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2020-01-31 00:51:39 -0800 |
| commit | b4f4b72a50983464864810e642e0b70e0b987e6f (patch) | |
| tree | 41a9427f1ddec56640755c4a811b51ffda9b6a02 /lua/nvim_lsp | |
| parent | rename "skeleton" to "configs" (diff) | |
| download | nvim-lspconfig-b4f4b72a50983464864810e642e0b70e0b987e6f.tar nvim-lspconfig-b4f4b72a50983464864810e642e0b70e0b987e6f.tar.gz nvim-lspconfig-b4f4b72a50983464864810e642e0b70e0b987e6f.tar.bz2 nvim-lspconfig-b4f4b72a50983464864810e642e0b70e0b987e6f.tar.lz nvim-lspconfig-b4f4b72a50983464864810e642e0b70e0b987e6f.tar.xz nvim-lspconfig-b4f4b72a50983464864810e642e0b70e0b987e6f.tar.zst nvim-lspconfig-b4f4b72a50983464864810e642e0b70e0b987e6f.zip | |
configs.__newindex(): set init_options to empty dict
Problem: Sending default initOptions to ra_lsp_server the init options
emits error: "failed to deserialize config: invalid length 0,
expected struct ServerConfig with 12 elements" when receiving
an empty initializationOptions from vim.lsp.
Solution: Use an empty dict instead of empty list for
default_config.init_options
LSP spec says initOptions must be a dictionary.
fix #94
fix #107
Diffstat (limited to 'lua/nvim_lsp')
| -rw-r--r-- | lua/nvim_lsp/configs.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/nvim_lsp/configs.lua b/lua/nvim_lsp/configs.lua index fa0ca2c2..7deadf1e 100644 --- a/lua/nvim_lsp/configs.lua +++ b/lua/nvim_lsp/configs.lua @@ -27,7 +27,7 @@ function configs.__newindex(t, config_name, config_definition) local default_config = tbl_extend("keep", config_definition.default_config, { log_level = lsp.protocol.MessageType.Warning; settings = {}; - init_options = {}; + init_options = vim.empty_dict(); callbacks = {}; }) |
