From d5f3d395f490a252125044d0918267eb18298532 Mon Sep 17 00:00:00 2001 From: Iordanis Petkakis <12776461+dpetka2001@users.noreply.github.com> Date: Wed, 3 Jul 2024 22:49:21 +0300 Subject: [PATCH] feat(fzf-lua): preview keymaps for git (#3904) ## What is this PR for? It seems that the preview keymaps set right now only support the builtin previewer. From searching through `fzf-lua` docs, I found [here](https://github.com/ibhagwan/fzf-lua/blob/3b91c1a471160bd8620bdca8f18743d954994daa/README.md?plain=1#L634-L638) that additional mappings should be set for the other previewers such as `git` (otherwise the defaults `` could be used). I chose to use the same mappings for the `fzf` preview keymaps as they serve the same functionality. Please feel free to change if not to your liking. ## Does this PR fix an existing issue? Not an issue but a discussion #3895 ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/editor/fzf.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lua/lazyvim/plugins/extras/editor/fzf.lua b/lua/lazyvim/plugins/extras/editor/fzf.lua index 24eb52f5..e9b19496 100644 --- a/lua/lazyvim/plugins/extras/editor/fzf.lua +++ b/lua/lazyvim/plugins/extras/editor/fzf.lua @@ -53,6 +53,8 @@ return { config.defaults.keymap.fzf["ctrl-u"] = "half-page-up" config.defaults.keymap.fzf["ctrl-d"] = "half-page-down" config.defaults.keymap.fzf["ctrl-x"] = "jump" + config.defaults.keymap.fzf["ctrl-f"] = "preview-page-down" + config.defaults.keymap.fzf["ctrl-b"] = "preview-page-up" config.defaults.keymap.builtin[""] = "preview-page-down" config.defaults.keymap.builtin[""] = "preview-page-up"