A Neovim plugin that automatically closes unedited buffers when the buffer list grows too long.
hbac.nvim is a Neovim plugin that automatically manages the buffer list by closing unedited buffers when a configurable threshold is exceeded. It helps maintain a clean workspace by keeping only actively worked-on buffers, reducing clutter and improving focus during coding sessions.
Neovim users who prefer using the buffer list for navigation but find it becomes cluttered with files opened for browsing (like checking definitions or debugging) rather than active editing.
Developers choose hbac.nvim for its heuristic, automated approach to buffer management that requires minimal configuration, combined with manual control features like buffer pinning and Telescope integration for fine-tuning.
Heuristic buffer auto-close
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically closes the oldest unedited buffer when the total count exceeds a configurable threshold (default 10), reducing clutter without manual intervention, as described in the 'Automatic Buffer Closing' feature.
Allows buffers to be pinned to prevent auto-closing, with commands like `:Hbac toggle_pin` and integration for statusline display, giving users control over important files.
Provides a Telescope picker to view and manage buffer pin states with custom actions, such as toggling pins or closing unpinned buffers, enhancing visual management as detailed in the 'Telescope Integration' section.
Integrates with resession.nvim to save and restore pinned buffers across Neovim sessions, ensuring continuity, as highlighted in the 'Session Support' feature.
Edited buffer detection is based only on entering insert mode or modifications, which may not capture all cases where a buffer should be kept open, such as during passive viewing or debugging.
The visual picker feature requires Telescope and its dependencies, adding setup complexity and bloat for users not already in that ecosystem, as noted in the installation and configuration sections.
Some Telescope options like 'bufnr_width' and 'path_display' are unsupported, and the closing logic is fixed to the oldest unedited buffer, with no way to define custom rules, as admitted in the README under 'Telescope configuration'.