Skip to content

Commit

Permalink
chore: debug check health command
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesmithgh committed Nov 10, 2024
1 parent 90ff0b2 commit baef88e
Showing 1 changed file with 22 additions and 11 deletions.
33 changes: 22 additions & 11 deletions lua/kitty-scrollback/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,28 @@ M.checkhealth = function()
require('kitty-scrollback.backport').setup()
end
if vim.fn.has('nvim-0.9') > 0 then
vim
.system({
-- fallback to 'kitty' because checkhealth can be called outside of standard setup flow
(p and p.kitty_data and p.kitty_data.kitty_path) and p.kitty_data.kitty_path or 'kitty',
'@',
'kitten',
kitty_scrollback_kitten,
'--config',
'ksb_builtin_checkhealth',
})
:wait()
local temp_buf = vim.api.nvim_create_buf(true, true)
vim.api.nvim_buf_set_text(temp_buf, 0, 0, 0, 0, {
(p and p.kitty_data and p.kitty_data.kitty_path) and p.kitty_data.kitty_path
or 'kitty'
.. ' @ '
.. 'kitten '
.. kitty_scrollback_kitten
.. ' --config'
.. ' ksb_builtin_checkhealth',
})
vim.api.nvim_win_set_buf(0, temp_buf)
-- vim
-- .system({
-- -- fallback to 'kitty' because checkhealth can be called outside of standard setup flow
-- (p and p.kitty_data and p.kitty_data.kitty_path) and p.kitty_data.kitty_path or 'kitty',
-- '@',
-- 'kitten',
-- kitty_scrollback_kitten,
-- '--config',
-- 'ksb_builtin_checkhealth',
-- })
-- :wait()
else
-- fallback on checkhealth for earlier versions of nvim
vim.cmd.checkhealth('kitty-scrollback')
Expand Down

0 comments on commit baef88e

Please sign in to comment.