Scrolling the previewer in the buffers provider #1861
-
Hi, I'm trying to configure the scrolling keys to the buffers provider using the following setup: keymap = {
builtin = {
["<C-d>"] = "preview-page-down",
["<C-u>"] = "preview-page-up",
},
},
buffers = {
actions = {
["ctrl-d"] = false,
},
}, If I don't set the actions setting, then This plugin is awesome btw! Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 14 replies
-
Are you using bat previewer? Bat is a “native” previewer requiring to setup similar binds under keymap.fzf. |
Beta Was this translation helpful? Give feedback.
-
This is all the fzf-lua related config that I have: Plug("ibhagwan/fzf-lua", { branch = "main" })
local fzf = require("fzf-lua")
local actions = require("fzf-lua").actions
fzf.setup({
"telescope",
grep = {
rg_glob = true,
},
fzf_opts = { ["--cycle"] = "" },
keymap = {
builtin = {
["<C-d>"] = "preview-page-down",
["<C-u>"] = "preview-page-up",
},
fzf = {
["ctrl-d"] = "preview-page-down",
["ctrl-u"] = "preview-page-up",
},
},
buffers = {
actions = {
["ctrl-d"] = false,
},
},
})
vim.keymap.set("n", "<leader>fg", fzf.grep_cword, {})
vim.keymap.set("n", "<leader>lg", fzf.live_grep, {})
vim.keymap.set("n", "<leader>ft", fzf.tags_grep_cword, {})
vim.keymap.set("n", "<leader>lt", fzf.tags, {})
vim.keymap.set("n", "<leader>ff", fzf.files, {})
vim.keymap.set("n", "<leader>fb", fzf.buffers, {}) I don't think that I'm using the bat previewer. Even after setting it in keymap.fzf, the keybinding for Is there a way that I can disable buffer closing in the buffer provider? I don't close buffers at all, so |
Beta Was this translation helpful? Give feedback.
The code for the telescope profile gave me some hints at this, I finally got it working: