At https://github.com/rcarriga/vim-ultest/wiki/Debugging-Recipes, the pytest recipe refers to a module_index variable that's not defined. I don't (yet) fully understand what ought to be in cmd, but I used the following code just to follow the intent of the code in the recipe, and I can confirm it works (i.e., :UltestDebug starts up a debugging session).
+ local module_index = 1
+ if vim.tbl_contains(non_modules, cmd[1]) then
+ module_index = 3
+ end
+ local module = cmd[module_index]
+ local args = vim.list_slice(cmd, module_index + 1)
(I didn't see a way to edit the wiki directly, and I'm not sure how to make a PR against it, hence this issue.)
At https://github.com/rcarriga/vim-ultest/wiki/Debugging-Recipes, the pytest recipe refers to a
module_index
variable that's not defined. I don't (yet) fully understand what ought to be incmd
, but I used the following code just to follow the intent of the code in the recipe, and I can confirm it works (i.e.,:UltestDebug
starts up a debugging session).(I didn't see a way to edit the wiki directly, and I'm not sure how to make a PR against it, hence this issue.)