feat/hack: Add builtin.builtin
This commit is contained in:
@@ -193,7 +193,7 @@ previewers.qflist = previewers.new {
|
||||
setup = function()
|
||||
local command_string = "cat %s"
|
||||
if vim.fn.executable("bat") then
|
||||
command_string = "bat %s --highlight-line %s -r %s:%s"
|
||||
command_string = "bat %s --highlight-line %s -r %s:%s" .. bat_options
|
||||
end
|
||||
|
||||
return {
|
||||
@@ -209,9 +209,15 @@ previewers.qflist = previewers.new {
|
||||
local filename = entry.value.filename
|
||||
local lnum = entry.value.lnum
|
||||
|
||||
local context = math.floor(height / 2)
|
||||
local start = math.max(0, lnum - context)
|
||||
local finish = lnum + context
|
||||
local start, finish
|
||||
if entry.start and entry.finish then
|
||||
start = entry.start
|
||||
finish = entry.finish
|
||||
else
|
||||
local context = math.floor(height / 2)
|
||||
start = math.max(0, lnum - context)
|
||||
finish = lnum + context
|
||||
end
|
||||
|
||||
vim.api.nvim_win_set_buf(status.preview_win, bufnr)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user