fix: adapt to Nvim deprecations in 0.10 (#3109)

This commit is contained in:
Christian Clason
2024-05-17 14:39:12 +02:00
committed by GitHub
parent 96610122a4
commit bbdbb7593f
10 changed files with 34 additions and 17 deletions

View File

@@ -116,7 +116,13 @@ end, {
local n = #l - 2
if n == 0 then
local commands = vim.tbl_flatten { builtin_list, extensions_list }
local commands = { builtin_list, extensions_list }
-- TODO(clason): remove when dropping support for Nvim 0.9
if vim.fn.has "nvim-0.10" then
commands = vim.iter(commands):flatten():totable()
else
commands = vim.tbl_flatten(commands)
end
table.sort(commands)
return vim.tbl_filter(function(val)