neovim-config/lua/plugins/configs/nvchad_ui.lua
siduck 74f2efca9f BREAKING Change for statusline_separator & tabufline overriders
moved statusline & tabufline into a new plugin to keep the base config clean and fix issues like (#1307)
2022-07-15 09:37:12 +05:30

40 lines
947 B
Lua

local present, _ = pcall(require, "nvchad_ui")
if not present then
return
end
local options = {
statusline = {
separator_style = "default", -- default/round/block/arrow
overriden_modules = nil,
},
-- lazyload it when there are 1+ buffers
tabufline = {
enabled = true,
lazyload = true,
overriden_modules = nil,
},
}
options = require("core.utils").load_override(options, "NvChad/ui")
require "nvchad_ui.tabufline.lazyload"(options.tabufline)
-- ignore this as it might scare you XD
return {
statusline = function()
return require("nvchad_ui.statusline").setup(options)
end,
tabufline = function()
return require("nvchad_ui.tabufline").setup(options)
end,
load_ui_plugins = function()
vim.opt.statusline = "%!v:lua.require('plugins.configs.nvchad_ui').statusline()"
vim.opt.tabline = "%!v:lua.require('plugins.configs.nvchad_ui').tabufline()"
end,
}