From 7a205c944d228ca0a5ec67656f59d20ba11ccca2 Mon Sep 17 00:00:00 2001 From: Steven Arcangeli Date: Tue, 23 Apr 2024 07:20:29 -0700 Subject: fix: refactor deprecated methods in neovim 0.10 --- lua/conform/util.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lua/conform/util.lua') diff --git a/lua/conform/util.lua b/lua/conform/util.lua index e967918..950bdae 100644 --- a/lua/conform/util.lua +++ b/lua/conform/util.lua @@ -133,11 +133,15 @@ M.extend_args = function(args, extra_args, opts) if type(extra_args) == "string" then error("extra_args must be a table when args is a table") end + local ret = {} if opts.append then - return vim.tbl_flatten({ args, extra_args }) + vim.list_extend(ret, args) + vim.list_extend(ret, extra_args) else - return vim.tbl_flatten({ extra_args, args }) + vim.list_extend(ret, extra_args) + vim.list_extend(ret, args) end + return ret end end end -- cgit v1.2.3-70-g09d2