diff options
| author | TJ DeVries <devries.timothyj@gmail.com> | 2020-08-27 22:55:44 -0400 |
|---|---|---|
| committer | TJ DeVries <devries.timothyj@gmail.com> | 2020-08-27 22:55:44 -0400 |
| commit | 4100795d0ca64b2afd073e90435374a16f3ae962 (patch) | |
| tree | 1965e78b562b113f3df4e561171cc130433cf7d4 /lua/telescope/previewers.lua | |
| parent | bb446421c5e97310fc0823c157d94cef624688bb (diff) | |
slightly better small screen UX
Diffstat (limited to 'lua/telescope/previewers.lua')
| -rw-r--r-- | lua/telescope/previewers.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lua/telescope/previewers.lua b/lua/telescope/previewers.lua index 8d1a1e1..5082b1a 100644 --- a/lua/telescope/previewers.lua +++ b/lua/telescope/previewers.lua @@ -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 { |
