a bit sloppy but working
This commit is contained in:
23
lua/config/nvim-bqf.lua
Normal file
23
lua/config/nvim-bqf.lua
Normal file
@@ -0,0 +1,23 @@
|
||||
require("bqf").setup({
|
||||
auto_enable = true,
|
||||
auto_resize_height = true,
|
||||
preview = {
|
||||
win_height = 12,
|
||||
win_vheight = 12,
|
||||
delay_syntax = 80,
|
||||
border_chars = { "┃", "┃", "━", "━", "┏", "┓", "┗", "┛", "█" },
|
||||
should_preview_cb = function(bufnr, qwinid)
|
||||
local ret = true
|
||||
local bufname = vim.api.nvim_buf_get_name(bufnr)
|
||||
local fsize = vim.fn.getfsize(bufname)
|
||||
if fsize > 100 * 1024 then
|
||||
-- skip file size greater than 100k
|
||||
ret = false
|
||||
elseif bufname:match("^fugitive://") then
|
||||
-- skip fugitive buffer
|
||||
ret = false
|
||||
end
|
||||
return ret
|
||||
end,
|
||||
},
|
||||
})
|
Reference in New Issue
Block a user