Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ChuufMaster/buffer-vacuum

A neovim plugin to vacuum up unused file buffers
https://github.com/ChuufMaster/buffer-vacuum

neovim neovim-plugin nvim plugin

Last synced: 7 days ago
JSON representation

A neovim plugin to vacuum up unused file buffers

Awesome Lists containing this project

README

        

# ๐Ÿงน buffer-vacuum

A neovim plugin to vacuum up unused file buffers

## โœจ Features

- Delete your oldest unsaved/unpinned buffer
- pin buffers to ignore them from the buffer count

## โšก๏ธ Requirements

- Neovim >=0.10

## TOC

- [๐Ÿงน buffer-vacuum](<#-buffer-vacuum>)
- [โœจ Features](<#-features>)
- [โšก๏ธ Requirements](<#%EF%B8%8F-requirements>)
- [TOC](<#toc>)
- [๐Ÿ“ฆ Installation](<#-installation>)
- [โš™๏ธ Configuration](<#%EF%B8%8F-configuration>)
- [๐Ÿš€ Usage](<#-usage>)
- [Plugins that work well with Buffer Vacuum](<#plugins-that-work-well-with-buffer-vacuum>)

## ๐Ÿ“ฆ Installation

Install the plugin with your preferred package manager:

### ๐Ÿ’ค [Lazy.nvim](https://github/folke/lazy.nvim)

```lua
return {
{
'ChuufMaster/buffer-vacuum',
opts = {}
},
}
```

## โš™๏ธ Configuration

Buffer-Vacuum comes with the following defaults:

```lua
{
-- The maximum number of buffers to keep (excluding modified buffer)
max_buffers = 6,

-- Change to True if you want pinned buffers to count to the
-- maximum number buffers
count_pinned_buffers = false,

-- Enable notifications every time a buffer is pinned or deleted
-- Default FALSE
enable_messages = false,
}
```

## ๐Ÿš€ Usage

**BufferVacuum** exposes 4 commands to the user:

- **BufferVacuumPinBuffer**: pin the current buffer so that it doesn't get
deleted
- **BufferVacuumToggle**: Toggle buffer-vacuum
- **BufferVacuumEnable**: Enable buffer-vacuum
- **BufferVacuumDisable**: Disable buffer-vacuum

## Plugins that work well with Buffer Vacuum

- [Bufferline](https://github.com/akinsho/bufferline.nvim)