https://github.com/metafates/muffin.nvim
🧁 Neovim plugin that provides breadcrumbs-like navigation
https://github.com/metafates/muffin.nvim
Last synced: 9 months ago
JSON representation
🧁 Neovim plugin that provides breadcrumbs-like navigation
- Host: GitHub
- URL: https://github.com/metafates/muffin.nvim
- Owner: metafates
- Created: 2025-07-03T17:44:28.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-07T17:56:59.000Z (12 months ago)
- Last Synced: 2025-08-06T07:43:00.375Z (11 months ago)
- Language: Lua
- Homepage:
- Size: 22.5 KB
- Stars: 9
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# muffin.nvim
A popup window that provides breadcrumbs-like navigation in keyboard-centric manner.
Inspired by [hasansujon786/nvim-navbuddy].

## Install
With [echasnovski/mini.deps]:
```lua
MiniDeps.add("metafates/muffin.nvim")
Muffin.setup()
```
With [folke/lazy.nvim]:
```lua
{
"metafates/muffin.nvim",
opts = {}
}
```
Installing [echasnovski/mini.icons] is suggested to show icons and enable highlighting.
See [mini.icons installation](https://github.com/echasnovski/mini.icons?tab=readme-ov-file#installation).
## Usage
Muffin provides the following functions:
```lua
--- Opens a popup with document symbols.
--- No-op if already open.
function Muffin.open() ... end
--- Closes the current popup.
--- No-op if already closed.
---@return boolean closed Indicates if popup was closed.
function Muffin.close() ... end
--- Opens a popup if it was not opened, closes otherwise.
function Muffin.toggle() ... end
```
You may want to set a bind for toggling this popup:
```lua
vim.keymap.set("n", "T", function()
Muffin.toggle()
end, { desc = "Toggle Muffin popup" })
```
### Keys
When popup is opened, you can use the following keys for certain actions:
| Key | Action |
| --- | ------ |
| c | Toggle comment on selected symbol |
| f | Toggle fold on selected symbol |
| q | Close popup |
| h | Go back |
| gh | Go back to root symbol |
| l | Go forward |
| gl | Go forward to the innermost symbol |
| return or o | Close popup and leave cursor at selected symbol |
You can't rebind these keys _yet_.
## To do
- [ ] More actions. For example copying and reordering.
- [ ] Allow rebinding built-in keys.
[echasnovski/mini.icons]: https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-icons.md
[folke/lazy.nvim]: https://github.com/folke/lazy.nvim
[echasnovski/mini.deps]: https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-deps.md
[hasansujon786/nvim-navbuddy]: https://github.com/hasansujon786/nvim-navbuddy