forked from rafi/vim-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbqf.lua
42 lines (36 loc) · 810 Bytes
/
bqf.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
-- plugin: bqf
-- see: https://github.com/kevinhwang91/nvim-bqf
-- rafi settings
require('bqf').setup({
auto_resize_height = false,
func_map = {
tab = 'st',
split = 'sv',
vsplit = 'sg',
stoggleup = 'K',
stoggledown = 'J',
stogglevm = '<Space>',
ptoggleitem = 'p',
ptoggleauto = 'P',
ptogglemode = 'zp',
pscrollup = '<C-b>',
pscrolldown = '<C-f>',
prevfile = 'gk',
nextfile = 'gj',
prevhist = '<S-Tab>',
nexthist = '<Tab>',
},
preview = {
auto_preview = true,
should_preview_cb = function(bufnr)
local ret = true
local filename = vim.api.nvim_buf_get_name(bufnr)
local fsize = vim.fn.getfsize(filename)
-- file size greater than 10k can't be previewed automatically
if fsize > 100 * 1024 then
ret = false
end
return ret
end
}
})