diff --git a/lua/chafa/health.lua b/lua/chafa/health.lua index 5e007fb..6cfaa94 100644 --- a/lua/chafa/health.lua +++ b/lua/chafa/health.lua @@ -1,12 +1,12 @@ local M = {} M.check = function() - vim.health.report_start("chafa.nvim health check") + vim.health.start("chafa.nvim health check") if vim.fn.executable("chafa") == 1 then - vim.health.report_ok("no issues found") + vim.health.ok("no issues found") else - vim.health.report_error("chafa executable not found") - vim.health.report_info("Follow installations instructions at https://hpjansson.org/chafa/download/") + vim.health.error("chafa executable not found") + vim.health.info("Follow installations instructions at https://hpjansson.org/chafa/download/") end end diff --git a/lua/chafa/init.lua b/lua/chafa/init.lua index cb59573..3a26e7a 100644 --- a/lua/chafa/init.lua +++ b/lua/chafa/init.lua @@ -11,13 +11,12 @@ local global_opts = nil ---@diagnostic disable-next-line: unused-local local get_image_data_sync = function(buf_path, width, height, opts, callback) - local command = { "chafa", buf_path, "--size", width .. "x" .. height } + local command = { "chafa", buf_path, "--size", width .. "x" .. height, "--format", "symbols", "--polite", "on" } vim.fn.jobstart(command, { stdout_buffered = true, on_stdout = function(_, data) if data then - table.remove(data) callback(data) end end,