doc cleanups

This commit is contained in:
Barrett Ruth 2025-10-05 12:32:43 -04:00
parent b68ecbbe96
commit f5a72a3a8f
4 changed files with 47 additions and 57 deletions

View file

@ -102,7 +102,7 @@ function M.handle_command(opts)
if cmd.action == 'interact' then
ui.toggle_interactive()
elseif cmd.action == 'run' then
ui.toggle_run_panel()
ui.toggle_run_panel({ debug = false })
elseif cmd.action == 'debug' then
ui.toggle_run_panel({ debug = true })
elseif cmd.action == 'next' then

View file

@ -65,6 +65,10 @@ function M.get_base_name()
end
end
function M.get_language()
return
end
function M.get_source_file(language)
local base_name = M.get_base_name()
if not base_name or not M.get_platform() then

View file

@ -115,7 +115,7 @@ function M.toggle_interactive()
state.set_active_panel('interactive')
end
---@param run_opts? RunOpts
---@param run_opts RunOpts
function M.toggle_run_panel(run_opts)
if state.get_active_panel() == 'run' then
if current_diff_layout then
@ -270,10 +270,14 @@ function M.toggle_run_panel(run_opts)
setup_keybindings_for_buffer(test_buffers.tab_buf)
if config.hooks and config.hooks.before_run then
config.hooks.before_run(state)
vim.schedule_wrap(function()
config.hooks.before_run(state)
end)
end
if run_opts.debug and config.hooks and config.hooks.before_debug then
config.hooks.before_debug(state)
vim.schedule_wrap(function()
config.hooks.before_debug(state)
end)
end
local execute = require('cp.runner.execute')