my-nvim-lua/lua/custom/plugins/configs/fzflua.lua

79 lines
1.1 KiB
Lua
Raw Normal View History

2022-08-22 01:28:23 +00:00
local present, fzf = pcall(require, "fzf-lua")
if not present then
return
end
local options = {
keymap = {
fzf = {
["ctrl-c"] = "abort",
["ctrl-z"] = "abort",
},
},
2022-08-22 01:28:23 +00:00
fzf_opts = {
['--layout'] = 'default',
['--padding'] = '3%,1%'
},
winopts = {
fullscreen = false
},
previewers = {
man = {
cmd = "man %s | col -bx",
}
},
files = {
previewer = "bat_native",
file_icons = true,
color_icons = false,
winopts = {
fullscreen = true
},
},
oldfiles = {
color_icons = false,
2022-08-31 16:15:46 +00:00
winopts = {
fullscreen = true
},
2022-08-22 01:28:23 +00:00
},
grep = {
previewer = "bat_native",
file_icons = false,
color_icons = false,
winopts = {
fullscreen = true
},
},
buffers = {
2022-08-31 16:15:46 +00:00
color_icons = false,
2022-08-22 01:28:23 +00:00
},
lines = {
color_icons = false
},
git = {
status = {
preview_pager = "delta --width=$FZF_PREVIEW_COLUMNS",
},
files = {
color_icons = false,
winopts = {
fullscreen = true
},
}
},
}
fzf.setup(options)