Skip to content

feat(recipes): add harpoon-bufsync recipe#1782

Open
p0uyaDev wants to merge 2 commits into
AstroNvim:mainfrom
p0uyaDev:feat-harpoon-bufsync
Open

feat(recipes): add harpoon-bufsync recipe#1782
p0uyaDev wants to merge 2 commits into
AstroNvim:mainfrom
p0uyaDev:feat-harpoon-bufsync

Conversation

@p0uyaDev

@p0uyaDev p0uyaDev commented Jul 9, 2026

Copy link
Copy Markdown

📑 Description

Adds a new recipe that syncs AstroNvim's Heirline tabline buffer order with Harpoon v2 marks.

Harpoon lets you pin frequently-used files for quick navigation, but the tabline doesn't reflect Harpoon's order — it tracks buffers by open-time and internal buffer ID. With a single keybind (<Leader>bsh), this recipe:

  • Closes buffers not in your Harpoon list
  • Opens Harpoon-marked files that aren't open yet
  • Sorts the tabline buffer order to match your Harpoon mark order
  • Redraws the tabline

📖 Additional Information

Requirements:

  • Harpoon v2 (harpoon2 branch)
  • AstroCore (bundled with AstroNvim)

Caveats:

  • Only affects the current tab
  • Non-existent file paths in Harpoon are skipped (not opened)
  • Unsaved buffers in the non-Harpoon set will be closed — save before syncing

Files:

  • lua/astrocommunity/recipes/harpoon-bufsync/init.lua
  • lua/astrocommunity/recipes/harpoon-bufsync/README.md

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Review Checklist

Does this PR follow the [Contribution Guidelines](development guidelines)? Following is a partial checklist:

Proper conventional commit scoping:

  • If you are adding a new plugin, the scope would be the name of the category it is being added into. ex. feat(utility): added noice.nvim plugin

  • If you are modifying a pre-existing plugin or pack, the scope would be the name of the plugin folder. ex. fix(noice-nvim): fix LSP handler error

  • Pull request title has the appropriate conventional commit type and scope where the scope is the name of the pre-existing directory in the project as described above

  • README is properly formatted and uses fenced in links with <url> unless they are inside a [title](url)

  • Entry returns a single plugin spec with the new plugin as the only top level spec (not applicable for recipes or packs).

  • Proper usage of opts table rather than setting things up with the config function.

  • Proper usage of specs table for all specs that are not dependencies of a given plugin (not applicable for recipes or packs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant