way too lazy to sort this out, adding kitchen sink
This commit is contained in:
@ -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',
|
||||
|
Reference in New Issue
Block a user