forked from abzcoding/lvim
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbqf.lua
More file actions
49 lines (41 loc) · 978 Bytes
/
bqf.lua
File metadata and controls
49 lines (41 loc) · 978 Bytes
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
43
44
45
46
47
48
49
local M = {}
M.config = function()
local status_ok, bqf = pcall(require, "bqf")
if not status_ok then
return
end
bqf.setup {
auto_resize_height = true,
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,
},
}
end
return M