Commit 679762e
committed
Support opts.config as function
Instead of adding overrides this allows extending the generated config
dynamically.
For example to profile a test case using `cProfile` one could use a
`config` like this for `test_method`:
config = function(config)
local newconfig = vim.deepcopy(config)
newconfig.module = "cProfile"
newconfig.args = {
"-m", config.module
}
vim.list_extend(newconfig.args, config.args)
return newconfig
end1 parent 84e89ad commit 679762e
1 file changed
+11
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | | - | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
460 | 469 | | |
461 | 470 | | |
462 | 471 | | |
| |||
582 | 591 | | |
583 | 592 | | |
584 | 593 | | |
585 | | - | |
| 594 | + | |
586 | 595 | | |
587 | 596 | | |
588 | 597 | | |
| |||
0 commit comments