You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I read through the doc and looked at the discussions. I can't find how to configure the task I needed.
I want to run the script run_tests.py in a terminal. I wrote the below recipe. But it doesn't seem to launch in terminal (or toggle_terminal).
return {
name = "Test executor",
builder = function(in_args)
local file = vim.fn.expand("%:p")
local cmd = { file }
local args = {}
if vim.bo.filetype == "python" then
---@diagnostic disable-next-line: cast-local-type
cmd = "scripts/execute_tests.py"
args = {
"--verbose",
}
end
if in_args then
-- for _, value in pairs(in_args) do
-- table.insert(args, value)
-- end
args = require("astrocore").extend_tbl(args, in_args)
end
return {
cmd = cmd,
cwd = vim.env.ws_root,
use_shell = true,
open_on_start = true,
quit_on_exit = false,
close_on_exit = false,
use_terminal = true,
-- https://github.com/stevearc/overseer.nvim/blob/master/doc/strategies.md#terminal
strategy = "terminal", -- is this correct
args = args,
components = {
{ "on_output_quickfix", set_diagnostics = true },
"on_result_diagnostics",
"default",
},
}
end,
condition = {
filetype = { "python" },
},
}
Beta Was this translation helpful? Give feedback.
All reactions