Skip to content

metafates/muffin.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 

Repository files navigation

muffin.nvim

A popup window that provides breadcrumbs-like navigation in keyboard-centric manner. Inspired by hasansujon786/nvim-navbuddy.

demo

Install

With echasnovski/mini.deps:

MiniDeps.add("metafates/muffin.nvim")

Muffin.setup()

With folke/lazy.nvim:

{
    "metafates/muffin.nvim",
    opts = {}
}

Installing echasnovski/mini.icons is suggested to show icons and enable highlighting.

See mini.icons installation.

Usage

Muffin provides the following functions:

--- 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:

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.

About

🧁 Neovim plugin that provides breadcrumbs-like navigation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages