feat: add snacks.nvim and fzf-lua fuzzy picker integrations#201
Open
awerebea wants to merge 1 commit into
Open
feat: add snacks.nvim and fzf-lua fuzzy picker integrations#201awerebea wants to merge 1 commit into
awerebea wants to merge 1 commit into
Conversation
Add two new fuzzy picker adapters mirroring the existing telescope
integration. Both support tag selection (Enter), deletion (Ctrl-x),
and rename (Ctrl-r). fzf-lua additionally supports multi-select
deletion via Tab + Ctrl-x.
New public API:
require("grapple").open_snacks(opts)
require("grapple").open_fzf(opts)
Both are also reachable via :Grapple open_snacks and :Grapple open_fzf.
Add fuzzy_picker setting (default "auto") that controls which picker is
opened by the new <C-f> keymap inside the Grapple tags window. "auto"
tries snacks -> fzf-lua -> telescope in order of availability.
Update README and vimdoc with new integrations, fuzzy_picker setting
description, and the <C-f> tags-window action.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
lua/grapple/extensions/snacks.luaandlua/grapple/extensions/fzf_lua.luapicker adapters, mirroring telescope's tag selection (
<CR>), deletion (<C-x>),and rename (
<C-r>) actions<C-f>keymap inside the Grapple tags window to hand off to a fuzzy picker;controlled by the new
fuzzy_pickersetting (default"auto")Grapple.open_snacks()andGrapple.open_fzf()to the public API and:Grapple open_snacks/:Grapple open_fzfcommandsREADME.mdanddoc/grapple.txtwith integration docs and new defaultsettings entry
Details
The
fuzzy_picker = "auto"setting selects the first available picker at runtimein the order: snacks -> fzf-lua -> telescope. Set to a specific string to pin the
picker, or
falseto disable<C-f>entirely.The snacks adapter passes
fileandposfields for native file preview withcursor positioning. The fzf-lua adapter uses
path:lnum:colentry format, whichthe builtin previewer parses for cursor placement, with a reverse-lookup table to
map selected entries back to tags.