summaryrefslogtreecommitdiffstats
path: root/after/plugin/telescope.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--after/plugin/telescope.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/after/plugin/telescope.lua b/after/plugin/telescope.lua
index 601a800..1f2d34a 100644
--- a/after/plugin/telescope.lua
+++ b/after/plugin/telescope.lua
@@ -48,7 +48,7 @@ telescope.setup {
local extension = split_path[#split_path]
return vim.tbl_contains(image_extensions, extension)
end
- if is_image(filepath) then
+ if is_image(filepath) and vim.fn.executable('chafa') == 1 then
local term = vim.api.nvim_open_term(bufnr, {})
local function send_output(_, data, _)
for _, d in ipairs(data) do
@@ -57,7 +57,7 @@ telescope.setup {
end
vim.fn.jobstart({
'chafa', '-C', 'on', '--animate', 'off', '-s',
- (telescopew() - 10)..'x20', '--clear', filepath
+ '23x18', '--clear', filepath
}, { on_stdout = send_output, stdout_buffered = true, pty = true })
a.nvim_set_option_value("number", false, { buf = bufnr })
else
@@ -87,6 +87,7 @@ telescope.setup {
telescope.load_extension('file_browser')
telescope.load_extension('projects')
telescope.load_extension('fzf')
+telescope.load_extension('harpoon')
a.nvim_create_autocmd('User', {
pattern = 'TelescopePreviewerLoaded',