Skip to content

Commit

Permalink
Add image previews to fzf-lua
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Apr 12, 2024
1 parent 3f5c25c commit 6f4afa2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions nvim/lua/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,19 +210,21 @@ require('conf/which-key')
local fzf_lua = require('fzf-lua')
fzf_lua.setup({ "fzf-vim" })

fzf_lua.setup {
defaults = {
file_previewer = require('fzf-lua.previewer').bat,
grep_previewer = require('fzf-lua.previewer').bat,
qflist_previewer = require('fzf-lua.previewer').bat,
fzf_lua.setup({
previewers = {
builtin = {
extensions = {
["png"] = { "viu", "-b" },
["svg"] = { "chafa", "{file}" },
},
},
},
}
})

fzf_lua.git_domo = function()
fzf_lua.files({
prompt = 'GitDomo>',
cmd = '{ git diff --name-only; git domo;} | sort -u',
previewer = 'bat',
})
end

Expand Down

0 comments on commit 6f4afa2

Please sign in to comment.