Updated README config sample

main
bhagwan 3 years ago
parent 20016902db
commit 3c5a9f5e31

@ -159,15 +159,32 @@ Consult the list below for available settings:
```lua
local actions = require "fzf-lua.actions"
require'fzf-lua'.setup {
winopts = {
win_height = 0.85, -- window height
win_width = 0.80, -- window width
win_row = 0.30, -- window row position (0=top, 1=bottom)
win_col = 0.50, -- window col position (0=left, 1=right)
-- win_border = false, -- window border? or borderchars?
win_border = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' },
window_on_create = function() -- nvim window options override
vim.cmd("set winhl=Normal:Normal") -- popup bg match normal windows
end,
},
-- fzf_bin = 'sk', -- use skim instead of fzf?
fzf_layout = 'reverse', -- fzf '--layout='
fzf_args = '', -- adv: fzf extra args, empty unless adv
fzf_binds = { -- fzf '--bind=' options
'f2:toggle-preview',
'f3:toggle-preview-wrap',
'shift-down:preview-page-down',
'shift-up:preview-page-up',
'ctrl-d:half-page-down',
'ctrl-u:half-page-up',
'ctrl-f:page-down',
'ctrl-b:page-up',
'ctrl-a:toggle-all',
'ctrl-l:clear-query',
},
preview_cmd = '', -- 'head -n $FZF_PREVIEW_LINES',
preview_border = 'border', -- border|noborder
preview_wrap = 'nowrap', -- wrap|nowrap
@ -177,7 +194,7 @@ require'fzf-lua'.setup {
preview_layout = 'flex', -- horizontal|vertical|flex
flip_columns = 120, -- #cols to switch to horizontal on flex
bat_theme = 'Coldark-Dark', -- bat preview theme (bat --list-themes)
bat_opts = '--style=numbers,changes --color always',
-- provider setup
files = {
prompt = 'Files ',
cmd = '', -- "find . -type f -printf '%P\n'",
@ -213,7 +230,8 @@ require'fzf-lua'.setup {
prompt = 'Rg ',
input_prompt = 'Grep For ',
-- cmd = "rg --vimgrep",
rg_opts = "--hidden --column --line-number --no-heading --color=always --smart-case -g '!{.git,node_modules}/*'",
rg_opts = "--hidden --column --line-number --no-heading " ..
"--color=always --smart-case -g '!{.git,node_modules}/*'",
git_icons = true, -- show git icons?
file_icons = true, -- show file icons?
color_icons = true, -- colorize file|git icons
@ -245,7 +263,7 @@ require'fzf-lua'.setup {
},
colorschemes = {
prompt = 'Colorschemes ',
live_preview = true,
live_preview = true, -- apply the colorscheme on preview?
actions = {
["default"] = actions.colorscheme,
["ctrl-y"] = function(selected) print(selected[2]) end,
@ -258,7 +276,9 @@ require'fzf-lua'.setup {
end,
},
post_reset_cb = function()
require('feline').reset_highlights()
-- reset statusline highlights after
-- a live_preview of the colorscheme
-- require('feline').reset_highlights()
end,
},
quickfix = {
@ -284,24 +304,13 @@ require'fzf-lua'.setup {
loclist = {},
helptags = {},
manpages = {},
file_icon_colors = { -- override colors for extensions
-- optional override of file extension icon colors
-- available colors (terminal):
-- clear, bold, black, red, green, yellow
-- blue, magenta, cyan, grey, dark_grey, white
file_icon_colors = {
["lua"] = "blue",
},
fzf_binds = { -- fzf '--bind=' options
'f2:toggle-preview',
'f3:toggle-preview-wrap',
'shift-down:preview-page-down',
'shift-up:preview-page-up',
'ctrl-d:half-page-down',
'ctrl-u:half-page-up',
'ctrl-f:page-down',
'ctrl-b:page-up',
'ctrl-a:toggle-all',
'ctrl-l:clear-query',
},
window_on_create = function() -- nvim window options override
vim.cmd("set winhl=Normal:Normal") -- popup bg match normal windows
end,
}
```

Loading…
Cancel
Save