From a894ced767a8128f6a05908189bf11e092e49089 Mon Sep 17 00:00:00 2001 From: siduck Date: Thu, 17 Nov 2022 21:32:55 +0530 Subject: [PATCH] add cmd to compile nvchad theme --- init.lua | 5 ++++- lua/core/init.lua | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 1516113..1c145ba 100644 --- a/init.lua +++ b/init.lua @@ -14,7 +14,10 @@ if fn.empty(fn.glob(install_path)) > 0 then print "Cloning packer .." fn.system { "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path } - os.execute("mkdir " .. vim.fn.stdpath "data" .. "/site/pack/packer/start/base46_cache/lua/base46_cache") + os.execute( + "mkdir " .. vim.fn.stdpath "data" .. "/site/pack/packer/start/base46_cache/compiled_themes/lua/base46_cache" + ) + require("base46").compile() -- install plugins + compile their configs diff --git a/lua/core/init.lua b/lua/core/init.lua index e96ca1a..80d9250 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -25,3 +25,9 @@ autocmd("VimEnter", { vim.cmd "command! -nargs=* -complete=customlist,v:lua.require'packer'.plugin_complete PackerSync lua require('plugins') require('core.utils').packer_sync()" end, }) + +local new_cmd = vim.api.nvim_create_user_command + +new_cmd("CompileNvTheme", function() + require("base46").compile() +end, {})