rm misleading field name for tabufline in default_config

This commit is contained in:
siduck 2022-06-25 11:21:50 +05:30
parent 845d5b4866
commit 876295ec02
3 changed files with 5 additions and 7 deletions

View File

@ -1,5 +1,4 @@
-- IMPORTANT NOTE : This is default config, so dont change anything here. -- Chadrc overrides this file
-- chadrc overrides this file
local M = {} local M = {}
@ -28,7 +27,8 @@ M.ui = {
override = {}, override = {},
}, },
tabufline_enabled = true, -- lazyload it when there are 1+ buffers
tabufline_lazyloaded = true,
} }
M.plugins = { M.plugins = {

View File

@ -38,7 +38,7 @@ autocmd("BufEnter", {
vim.t.bufs = vim.api.nvim_list_bufs() vim.t.bufs = vim.api.nvim_list_bufs()
-- thx to https://github.com/ii14 && stores buffer per tab -> table -- thx to https://github.com/ii14 & stores buffer per tab -> table
autocmd({ "BufAdd" }, { autocmd({ "BufAdd" }, {
callback = function(args) callback = function(args)
if vim.t.bufs == nil then if vim.t.bufs == nil then
@ -72,7 +72,7 @@ autocmd("BufDelete", {
end, end,
}) })
if require("core.utils").load_config().ui.tabufline_enabled then if require("core.utils").load_config().ui.tabufline_lazyloaded then
require("core.lazy_load").tabufline() require("core.lazy_load").tabufline()
else else
vim.opt.showtabline = 2 vim.opt.showtabline = 2

View File

@ -116,8 +116,6 @@ M.tabufline = function()
vim.opt.showtabline = 2 vim.opt.showtabline = 2
vim.opt.tabline = "%!v:lua.require('ui.tabline').run()" vim.opt.tabline = "%!v:lua.require('ui.tabline').run()"
vim.api.nvim_del_augroup_by_name "TabuflineLazyLoad" vim.api.nvim_del_augroup_by_name "TabuflineLazyLoad"
else
return ""
end end
end, end,
}) })