Skip to content

Commit

Permalink
chore: troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
mikesmithgh committed Dec 10, 2023
1 parent 8819f2d commit b35060b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 7 deletions.
18 changes: 12 additions & 6 deletions lua/kitty-scrollback/api.lua
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,14 @@ M.generate_kittens = function(all, generate_modes)
target_gen_modes[gen_mode] = true
end

local kitty_scrollback_kitten =
vim.api.nvim_get_runtime_file('python/kitty_scrollback_nvim.py', false)[1]
local example_path =
vim.api.nvim_get_runtime_file('lua/kitty-scrollback/configs/example.lua', false)[1]
local kitty_scrollback_kitten = vim.fn.fnamemodify(
vim.api.nvim_get_runtime_file('python/kitty_scrollback_nvim.py', false)[1],
':p'
)
local example_path = vim.fn.fnamemodify(
vim.api.nvim_get_runtime_file('lua/kitty-scrollback/configs/example.lua', false)[1],
':p'
)

local action_alias = 'kitty_scrollback_nvim'
local alias_config = {
Expand Down Expand Up @@ -181,8 +185,10 @@ M.generate_kittens = function(all, generate_modes)
end

M.checkhealth = function()
local kitty_scrollback_kitten =
vim.api.nvim_get_runtime_file('python/kitty_scrollback_nvim.py', false)[1]
local kitty_scrollback_kitten = vim.fn.fnamemodify(
vim.api.nvim_get_runtime_file('python/kitty_scrollback_nvim.py', false)[1],
':p'
)
-- NOTE(#58): nvim v0.9 support
-- setup backports for v0.9 because checkhealth can be called outside of standard setup flow
if vim.fn.has('nvim-0.10') <= 0 then
Expand Down
2 changes: 1 addition & 1 deletion tests/kitty-scrollback/kitty_scrollback_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ $ brew search a 󰄛
it('should successfully open checkhealth', function()
h.assert_screen_starts_with(
h.feed_kitty({
[[nvim +'KittyScrollbackCheckHealth']],
[[nvim +'lua vim.opt.rtp:append("../..") vim.opt.rtp:append("../../kitty-scrollback.nvim") require("kitty-scrollback").setup() vim.cmd("KittyScrollbackCheckHealth")']],
[[\n]], -- enter
}),
[[
Expand Down
3 changes: 3 additions & 0 deletions tests/minimal_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ vim.opt.rtp:append(plenary_dir)

vim.cmd('runtime plugin/plenary.vim')
require('plenary.busted')

vim.opt.rtp:append('kitty-scrollback.nvim')
require('kitty-scrollback').setup()

0 comments on commit b35060b

Please sign in to comment.