Can I have a permanent window that shows only results of last run? #277
Replies: 4 comments
-
I am doing this to clear the panel prior to run: return function()
local buf = vim.fn.bufnr 'Neotest Output Panel'
if buf ~= -1 then
wb.set_options({ modifiable = true }, { buf = buf })
vim.api.nvim_buf_set_lines(buf, 0, -1, false, {})
wb.set_options({ modifiable = false }, { buf = buf })
end
neotest.run.run(opts)
end (in the above, |
Beta Was this translation helpful? Give feedback.
-
In looking at the |
Beta Was this translation helpful? Give feedback.
-
@WhoIsSethDaniel did you find the solution? I have the same problem 🙂 |
Beta Was this translation helpful? Give feedback.
-
No. |
Beta Was this translation helpful? Give feedback.
-
I have one question:
Can I have a 'permanent' window that only shows the results of the most recent run? I'd especially like it if I can watch the output as it happens. I have tried setting
neotest.output.open.open_win
to a function. When I run a test (or tests) I can then open the window usingneotest.output.open({ open_win = function(...), last_run = true, ...
. This works, but the next run of the test(s) doesn't refresh the window. I have to enter the window, close it, and re-open it. I tried adding theneotest.output.open(...)
directly after theneotest.run.run()
but the window continued to show the previous run. I think what I want is something likeoutput_panel
but that clears the window before each run. The output is useful for me except that it has lots of other runs...none of which I care about. It can make it difficult to find what I am looking for. I tried clearing theoutput_panel
just prior toneotest.run.run()
but the output to the panel became garbled for reasons I am unclear about. I think maybe using theoutput_panel
would be my preferred way, but I haven't been able to figure out why the output becomes so garbled.I am using the
neotest-go
runner only, at this time.Beta Was this translation helpful? Give feedback.
All reactions