Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ariel-frischer/bmessages.nvim
Bmessages.nvim better :messages window using an auto-updating buffer.
https://github.com/ariel-frischer/bmessages.nvim
Last synced: 14 days ago
JSON representation
Bmessages.nvim better :messages window using an auto-updating buffer.
- Host: GitHub
- URL: https://github.com/ariel-frischer/bmessages.nvim
- Owner: ariel-frischer
- License: mit
- Created: 2023-12-16T21:32:45.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-05-02T02:09:19.000Z (6 months ago)
- Last Synced: 2024-07-31T20:50:58.918Z (3 months ago)
- Language: Lua
- Homepage:
- Size: 722 KB
- Stars: 42
- Watchers: 1
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- awesome-neovim - ariel-frischer/bmessages.nvim - Replace the default :messages window with a configurable, auto-updating buffer. (Utility / Cursorline)
README
[](https://neovim.io/)
# 💬 Bmessages - Better Neovim Messages
https://github.com/ariel-frischer/bmessages.nvim/assets/19893395/10ae410d-7d0d-4568-9c27-dc7ca6f89137
## ✨ Features
- **Auto-updating Buffers**: `:Bmessages` automatically updates the messages buffer.
- **Customizable Split Types**: Choose between horizontal (`split`) and vertical (`vsplit`) split types for displaying the messages buffer.
- **Resizable Splits**: Easily configure the size of the message buffer split, both for vertical and horizontal layouts.
- **Improved Usability**: The buffer behaves like any standard Neovim buffer, allowing for easier navigation and interaction.
- **Autoscroll Option**: Automatically scroll to the latest message useful when debugging enabled by default.## 📦 Installation
Add `bmessages` to your Neovim configuration using your preferred package manager.
#### With [lazy.nvim](https://github.com/folke/lazy.nvim)
Click to expand/collapse
```lua
{
"ariel-frischer/bmessages.nvim",
event = "CmdlineEnter",
opts = {}
}
```#### With [packer.nvim](https://github.com/wbthomason/packer.nvim)
Click to expand/collapse
```lua
use({
"ariel-frischer/bmessages.nvim",
config = function()
require("bmessages").setup({
-- config here or empty for defaults
})
end,
})
```#### With [vim-plug](https://github.com/junegunn/vim-plug)
Click to expand/collapse
```vim
Plug 'ariel-frischer/bmessages.nvim'
" ... other plugins...
" after plug#end()
" provide `setup()` configuration options or leave empty for defaults
lua require('bmessages').setup()
```#### With [pckr.nvim](https://github.com/lewis6991/pckr.nvim)
Click to expand/collapse
```lua
{ "ariel-frischer/bmessages.nvim",
config = function()
require("bmessages").setup({
-- config here or empty for defaults
})
end,
};
```### ⚙️ Available Configuration Options
Given options are the default values.
```lua
local opts = {
-- Time in milliseconds between each update of the messages buffer.
timer_interval = 1000,
-- Default split type for the messages buffer ('vsplit' or 'split').
split_type = "vsplit",
-- Default split direction for the messages buffer ('topleft' or 'botright').
split_direction = nil,
-- Size of the vertical split when opening the messages buffer.
split_size_vsplit = nil,
-- Size of the horizontal split when opening the messages buffer.
split_size_split = nil,
-- Automatically scroll to the latest message in the buffer.
autoscroll = true,
-- Use a timer to auto-update the messages buffer. When this is disabled,
-- the buffer will not update, but the buffer becomes modifiable.
use_timer = true,
-- Name of the messages buffer.
buffer_name = "bmessages_buffer",
-- Don't add user commands for `Bmessages`, `Bmessagesvs`, and `Bmessagessp`.
disable_create_user_commands = false,
-- Don't focus the bmessages window after opening.
keep_focus = false,
}
```## 🚀 Usage
### `:Bmessages`
Creates a message buffer with the configured options.
### `:Bmessagesvs`
Creates a message buffer with a vertical split, overriding the `split_type` to `vsplit`.
### `:Bmessagessp`
Creates a message buffer with a horizontal split, overriding the `split_type` to `split`.
### `:BmessagesEdit`
Creates an editable message buffer with the configured options without auto updating.
### Lua API
```lua
require("bmessages").toggle({ split_type = "split" })
```## ⌨️ Keymaps
No keymaps are set by default, but you can easily set your own keymaps to open the messages buffer.
```lua
vim.api.nvim_set_keymap("n", "bm", ":Bmessages", { noremap = true, silent = true })
```## 👏 Acknowledgements
* [plugin-template.nvim](https://github.com/m00qek/plugin-template.nvim)