clean stuff

5501044bfd
This commit is contained in:
siduck 2022-07-24 17:00:09 +00:00
parent 26fc9b5a6c
commit 5d4c51127c
3 changed files with 9 additions and 41 deletions

View File

@ -1,40 +0,0 @@
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,
}

View File

@ -2,6 +2,14 @@ local M = {}
local load_override = require("core.utils").load_override
M.nvchad_ui = function()
local present, nvchad_ui = pcall(require, "nvchad_ui")
if present then
nvchad_ui.setup()
end
end
M.autopairs = function()
local present1, autopairs = pcall(require, "nvim-autopairs")
local present2, cmp = pcall(require, "cmp")

View File

@ -19,7 +19,7 @@ local plugins = {
["NvChad/ui"] = {
after = "base46",
config = function()
require("plugins.configs.nvchad_ui").load_ui_plugins()
require("plugins.configs.others").nvchad_ui()
end,
},