mirror of
https://github.com/neovim/neovim.git
synced 2026-04-19 22:10:45 +00:00
feat(test): support and document lua test case debugging
Similar to how there is a `GDB` environment variable to let the nvim test instances to be run under `gdbserver` this adds a `OSV_PORT` variable to start nvim test instances with `osv` in blocking mode to let a debug client attach to it for debugging of `exec_lua` code blocks.
This commit is contained in:
committed by
Mathias Fußenegger
parent
14ee1de7e5
commit
34cd94812d
@@ -48,6 +48,16 @@ M.nvim_argv = {
|
||||
'unlet g:colors_name',
|
||||
'--embed',
|
||||
}
|
||||
if os.getenv('OSV_PORT') then
|
||||
table.insert(M.nvim_argv, '--cmd')
|
||||
table.insert(
|
||||
M.nvim_argv,
|
||||
string.format(
|
||||
"lua require('osv').launch({ port = %s, blocking = true })",
|
||||
os.getenv('OSV_PORT')
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
-- Directory containing nvim.
|
||||
M.nvim_dir = M.nvim_prog:gsub('[/\\][^/\\]+$', '')
|
||||
|
||||
Reference in New Issue
Block a user