way too lazy to sort this out, adding kitchen sink

This commit is contained in:
2024-01-30 21:52:24 -05:00
parent e669b3eb8e
commit d94b454eb6
16 changed files with 102 additions and 120 deletions

View File

@ -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',