Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sontungexpt/buffer-closer
The neovim plugin to auto close unused buffer after retirement time
https://github.com/sontungexpt/buffer-closer
automation buffer buffer-management lua neovim neovim-plugin nvim nvim-lua plugin
Last synced: 17 days ago
JSON representation
The neovim plugin to auto close unused buffer after retirement time
- Host: GitHub
- URL: https://github.com/sontungexpt/buffer-closer
- Owner: sontungexpt
- License: gpl-3.0
- Created: 2023-07-23T05:29:57.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-02T01:51:26.000Z (about 1 year ago)
- Last Synced: 2023-10-02T02:46:12.882Z (about 1 year ago)
- Topics: automation, buffer, buffer-management, lua, neovim, neovim-plugin, nvim, nvim-lua, plugin
- Language: Lua
- Homepage: https://sontungexpt.github.io/buffer-closer/
- Size: 91.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# buffer-closer
- [Features](#features)
- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)
- [Credits](#credits)
- [Similar Plugins](#similar-plugins)## Features
- Automatically close inactive buffers after a period of time in minutes or when the new buffer is adding
## Installation
```lua
-- lazy.nvim
{
'sontungexpt/buffer-closer',
event = "VeryLazy",
},
```## Configuration
```lua
-- 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
- [nvim-early-retirement](https://github.com/chrisgrieser/nvim-early-retirement)
## Credits
**Thanks**
Thanks for inspiration from [chrisgrieser](https://github.com/chrisgrieser/nvim-early-retirement)