Skip to content

Is it possible to configure previewer option at the picker level? #1852

Closed Answered by ibhagwan
dmy-gh asked this question in Q&A
Discussion options

You must be logged in to vote
require("fzf-lua").setup({
  previewers = {
    my_git_diff = { <copy from default and modify> }
  },
})

Then run :FzfLua git_status previewer=my_git_diff

Defaults here:

git_diff = {
pager = M._preview_pager_fn,
cmd_deleted = "git diff --color HEAD --",
cmd_modified = "git diff --color HEAD",
cmd_untracked = "git diff --color --no-index /dev/null",
-- TODO: modify previewer code to accept table cmd
-- cmd_deleted = { "git", "diff", "--color", "HEAD", "--" },
-- cmd_modified = { "git", "diff", "--color", "HEAD" },
-- cmd_untracked = { "git", "diff", "--color", "--no-index", "/de…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by dmy-gh
Comment options

You must be logged in to vote
2 replies
@ibhagwan
Comment options

@dmy-gh
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants