aboutsummaryrefslogtreecommitdiffstats
path: root/lua/conform/util.lua
diff options
context:
space:
mode:
authorSteven Arcangeli <stevearc@stevearc.com>2024-04-23 07:20:29 -0700
committerSteven Arcangeli <stevearc@stevearc.com>2024-04-23 07:20:54 -0700
commit7a205c944d228ca0a5ec67656f59d20ba11ccca2 (patch)
treeef712db0a785ba423a2f6ae4eee86045668fb8c7 /lua/conform/util.lua
parenta6965ac128eba75537ec2bc5ddd5d5e357062bdc (diff)
fix: refactor deprecated methods in neovim 0.10
Diffstat (limited to 'lua/conform/util.lua')
-rw-r--r--lua/conform/util.lua8
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