refactor(nvim): remove close button for bufferline
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 1m8s

This commit is contained in:
Price Hiller 2024-07-19 09:00:24 -05:00
parent be10c20f00
commit 8f4d72c847
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -396,37 +396,6 @@ return {
StatusLineFileFlags,
}
-- a nice "x" button to close the buffer
local StatusLineCloseButton = {
condition = function()
return not vim.bo.modified
end,
{
provider = " 󰅙 ",
hl = function(self)
local fg = colors.peachRed
local bg = buffer_hl.active.bg
if not self.is_active then
fg = colors.autumnRed
bg = buffer_hl.inactive.bg
end
return { fg = fg, bg = bg }
end,
on_click = {
callback = function(_, minwid)
vim.schedule(function()
vim.api.nvim_buf_delete(minwid, { force = false })
vim.cmd.redrawtabline()
end)
end,
minwid = function(self)
return self.bufnr
end,
name = "heirline_tabline_close_buffer_callback",
},
},
}
-- The final touch!
local StatusLineBufferBlock = {
{
@ -442,7 +411,6 @@ return {
end,
},
StatusLineFileNameBlock,
StatusLineCloseButton,
{
provider = seps.full.right,
hl = function(self)