fix: Add 'use_less' config value
This commit is contained in:
@@ -59,6 +59,7 @@ function config.set_defaults(defaults)
|
||||
-- List that will be executed.
|
||||
-- Last argument will be the search term (passed in during execution)
|
||||
set("vimgrep_arguments", {'rg', '--color=never', '--no-heading', '--with-filename', '--line-number', '--column', '--smart-case'})
|
||||
set("use_less", true)
|
||||
|
||||
-- TODO: Add motions to keybindings
|
||||
|
||||
|
||||
@@ -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"}
|
||||
|
||||
Reference in New Issue
Block a user