vim.g.base46_cache = vim.fn.stdpath('data') .. '/base46_cache/'
- Make sure to read nvconfig to know default options
lua/chadrc.lua
file must return a table which follows the structure of nvconfig.
---@type ChadrcConfig
local M = {}
M.ui = {
theme = "onedark"
}
return M
- Base46 just compiles your theme + settings into bytecode , so its not a startup plugin.
{ "nvim-lua/plenary.nvim", lazy = true },
{
"NvChad/base46",
lazy = true,
build = function()
require("base46").load_all_highlights()
end,
},
-- if u want nvchad's ui plugin :)
{
"NvChad/ui",
config = function()
require "nvchad"
end,
},
-- dependency for ui
{
"nvim-tree/nvim-web-devicons",
lazy = true,
opts = function()
return { override = require "nvchad.icons.devicons" }
end,
config = function(_, opts)
dofile(vim.g.base46_cache .. "devicons")
require("nvim-web-devicons").setup(opts)
end,
},
- Load cache file by dofile function ( add this in your startup )
dofile(vim.g.base46_cache .. "defaults")
dofile(vim.g.base46_cache .. "statusline")
require('base46').load_all_highlights() -- this compiles + loads hl
- You can load all cache files at once instead of lazyloding them
for _, v in ipairs(vim.fn.readdir(vim.g.base46_cache)) do
dofile(vim.g.base46_cache .. v)
end
hey @siduck, I am trying to follow the steps but it seems that base46_cache is not present in my stdpath. Am I missing something?