mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
Allow for tables in options
This commit is contained in:
parent
9c407ac252
commit
ac189ed7ce
1 changed files with 9 additions and 0 deletions
|
@ -231,6 +231,15 @@ in
|
||||||
if v then no = "" else no = "no" end
|
if v then no = "" else no = "no" end
|
||||||
|
|
||||||
vim.cmd("set " .. no .. k)
|
vim.cmd("set " .. no .. k)
|
||||||
|
elseif type(v) == "table" then
|
||||||
|
local val = ""
|
||||||
|
for i,opt in ipairs(v) do
|
||||||
|
val = val .. tostring(opt)
|
||||||
|
if i ~= #v then
|
||||||
|
val .. ","
|
||||||
|
end
|
||||||
|
end
|
||||||
|
vim.cmd("set " .. k .. "=" .. val)
|
||||||
else
|
else
|
||||||
vim.cmd("set " .. k .. "=" .. tostring(v))
|
vim.cmd("set " .. k .. "=" .. tostring(v))
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue