fix: Add 'use_less' config value

This commit is contained in:
TJ DeVries
2020-10-09 00:00:57 -04:00
parent ad12bf03d1
commit fe63e4f1de
2 changed files with 4 additions and 2 deletions

View File

@@ -1,8 +1,9 @@
local context_manager = require('plenary.context_manager')
local config = require('telescope.config')
local debounce = require('telescope.debounce')
local from_entry = require('telescope.from_entry')
local log = require('telescope.log')
local debounce = require('telescope.debounce')
local utils = require('telescope.utils')
local flatten = vim.tbl_flatten
@@ -18,7 +19,7 @@ Previewer.__index = Previewer
-- TODO: Should play with these some more, ty @clason
local bat_options = {"--style=plain", "--color=always", "--paging=always"}
local has_less = (vim.fn.executable('less') == 1)
local has_less = (vim.fn.executable('less') == 1) and config.values.use_less
local bat_maker = function(filename, lnum, start, finish)
local command = {"bat"}