From 5da124fc82c24592abc3a97c68363bb4e85e3c85 Mon Sep 17 00:00:00 2001 From: Max Sadrieh Date: Sun, 3 May 2020 13:31:35 -0700 Subject: Allow empty section string for configuration request microsoft/vscode-eslint requests configuration with a section of ''. This change returns the expected settings in that case. https://github.com/microsoft/vscode-eslint/blob/be30e933c56ea6e8e579808d5f7c7b205c8e16cc/server/src/eslintServer.ts#L668 --- lua/nvim_lsp/configs.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lua') diff --git a/lua/nvim_lsp/configs.lua b/lua/nvim_lsp/configs.lua index a70efdb5..9ec5a273 100644 --- a/lua/nvim_lsp/configs.lua +++ b/lua/nvim_lsp/configs.lua @@ -60,6 +60,10 @@ function configs.__newindex(t, config_name, config_def) 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 -- cgit v1.2.3-70-g09d2