diff options
| author | Max Sadrieh <max@sadrieh.io> | 2020-05-03 13:31:35 -0700 |
|---|---|---|
| committer | Max Sadrieh <max@sadrieh.io> | 2020-05-03 13:31:35 -0700 |
| commit | 5da124fc82c24592abc3a97c68363bb4e85e3c85 (patch) | |
| tree | 9d35e6a74a8d001d1f2ea749fbcba0dda108f9dc /lua/nvim_lsp | |
| parent | [docgen] Update README.md (diff) | |
| download | nvim-lspconfig-5da124fc82c24592abc3a97c68363bb4e85e3c85.tar nvim-lspconfig-5da124fc82c24592abc3a97c68363bb4e85e3c85.tar.gz nvim-lspconfig-5da124fc82c24592abc3a97c68363bb4e85e3c85.tar.bz2 nvim-lspconfig-5da124fc82c24592abc3a97c68363bb4e85e3c85.tar.lz nvim-lspconfig-5da124fc82c24592abc3a97c68363bb4e85e3c85.tar.xz nvim-lspconfig-5da124fc82c24592abc3a97c68363bb4e85e3c85.tar.zst nvim-lspconfig-5da124fc82c24592abc3a97c68363bb4e85e3c85.zip | |
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
Diffstat (limited to 'lua/nvim_lsp')
| -rw-r--r-- | lua/nvim_lsp/configs.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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 |
