From ac189ed7ced85e83a50afe44d6ce93a5d2bbdc9f Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Mon, 1 Feb 2021 14:50:05 +0000 Subject: [PATCH] Allow for tables in options --- nixvim.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nixvim.nix b/nixvim.nix index cd661ecb..52e94d7d 100644 --- a/nixvim.nix +++ b/nixvim.nix @@ -231,6 +231,15 @@ in if v then no = "" else no = "no" end 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 vim.cmd("set " .. k .. "=" .. tostring(v)) end