Awesome
buffer-closer
<!--toc:start--> <!--toc:end-->Features
- Automatically close inactive buffers after a period of time in minutes or when the new buffer is adding
Installation
-- lazy.nvim
{
'sontungexpt/buffer-closer',
event = "VeryLazy",
},
Configuration
-- default values
require("buffer-closer").setup({
min_remaining_buffers = 2, -- can not be less than 1
retirement_minutes = 3, -- can not be less than 1
-- close the buffer when the given events are triggered (see :h autocmd-events)
-- if the value is "default", the plugin will use the default events
-- if the value is "disabled", the plugin will not use any events
-- if the value is a table, the plugin will use the given events
events = "default", -- (table, "default", "disabled"):
timed_check = {
enabled = false,
interval_minutes = 1, -- can not be less than 1
},
excluded = {
filetypes = { "lazy", "NvimTree", "mason" },
buftypes = { "terminal", "nofile", "quickfix", "prompt", "help" },
filenames = {},
},
-- it means that a buffer will not be closed if it is opened in a window
ignore_working_windows = true,
})
Usage
- This plugin will automatically close inactive buffers after a period of time in minutes or when the new buffer is adding
- If you want to close all inactive buffers immediately, you can use
:BufferCloserRetire
command
Similar Plugins
Credits
Thanks
Thanks for inspiration from chrisgrieser