From 8109e02f701c874f70452a93a89759c978656793 Mon Sep 17 00:00:00 2001 From: nullchilly Date: Thu, 14 Jul 2022 00:59:48 +0700 Subject: [PATCH] fix(command): properties --- lua/catppuccin/utils/util.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/catppuccin/utils/util.lua b/lua/catppuccin/utils/util.lua index 8515e32..cc7f8db 100644 --- a/lua/catppuccin/utils/util.lua +++ b/lua/catppuccin/utils/util.lua @@ -101,7 +101,13 @@ vim.g.colors_name = "catppuccin"]] } local config = require("catppuccin.config").options local custom_highlights = config.custom_highlights for property, value in pairs(theme.properties) do - table.insert(lines, fmt("vim.o.%s = %s", property, value)) + if type(value) == "string" then + table.insert(lines, fmt('vim.o.%s = "%s"', property, value)) + elseif type(value) == "bool" then + table.insert(lines, fmt('vim.o.%s = %s', property, value)) + elseif type(value) == "table" then + table.insert(lines, fmt('vim.o.%s = %s', property, inspect(value))) + end end local tbl = vim.tbl_deep_extend("keep", theme.integrations, theme.base) tbl = vim.tbl_deep_extend("keep", custom_highlights, tbl)