diff options
Diffstat (limited to 'lua/conform/util.lua')
-rw-r--r-- | lua/conform/util.lua | 8 |
1 files changed, 6 insertions, 2 deletions
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 |