diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 9ee9faa..8a9e4a6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -29,7 +29,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest] - neovim_version: ["v0.10.4", "v0.11.3", "nightly"] + neovim_version: ["v0.11.3", "nightly"] include: - os: macos-latest neovim_version: v0.11.3 diff --git a/lua/python/config.lua b/lua/python/config.lua index a0353a8..fbe983c 100644 --- a/lua/python/config.lua +++ b/lua/python/config.lua @@ -184,9 +184,18 @@ local function tbl_deep_extend_existing(target, source, prev_key) -- Overwrite existing key target[key] = value end + elseif type(key) == "number" then + -- If the key is a number then we can assume + -- that this is a table that is supposed to be a list + goto continue else - error(("python.nvim: user inputted config key: %s is not found in config table: %s"):format(key, prev_key)) + vim.notify( + ("python.nvim: user inputted config key: %s is not found in config table: %s"):format(key, prev_key), + vim.log.levels.WARN + ) + goto continue end + ::continue:: end return target end diff --git a/tests/test_config.lua b/tests/test_config.lua index 1503781..2269dcd 100644 --- a/tests/test_config.lua +++ b/tests/test_config.lua @@ -34,9 +34,11 @@ T["setup"]["override"] = function() end T["setup"]["not_found"] = function() - expect.error(function() - child.lua("config.setup({ ui = { popup = {foobar = true}} })") - end, ".*user inputted config key: foobar is not found.*") + child.lua("config.setup({ ui = { popup = {foobar = true}} })") + eq( + child.lua([[return vim.split(vim.fn.execute("messages", "silent"), "\n")]]), + { "", "python.nvim: user inputted config key: foobar is not found in config table: config.ui.popup" } + ) end -- Return test set which will be collected and execute inside `MiniTest.run()`