slightly better small screen UX

This commit is contained in:
TJ DeVries
2020-08-27 22:55:44 -04:00
parent bb446421c5
commit 4100795d0c
3 changed files with 24 additions and 6 deletions

View File

@@ -5,6 +5,9 @@ local previewers = {}
local Previewer = {}
Previewer.__index = Previewer
local bat_options = "--style=grid --paging=always --wrap=never"
-- --terminal-width=%s
function Previewer:new(opts)
opts = opts or {}
@@ -122,7 +125,7 @@ previewers.vimgrep = previewers.new {
setup = function()
local command_string = "cat %s"
if vim.fn.executable("bat") then
command_string = "bat %s --style=grid --paging=always --highlight-line %s -r %s:%s"
command_string = "bat %s --highlight-line %s -r %s:%s" .. bat_options
end
return {
@@ -160,7 +163,7 @@ previewers.qflist = previewers.new {
setup = function()
local command_string = "cat %s"
if vim.fn.executable("bat") then
command_string = "bat %s --style=grid --paging=always --highlight-line %s -r %s:%s"
command_string = "bat %s --highlight-line %s -r %s:%s"
end
return {