-- Single-source-of-truth helper for project-local run/debug configs, meant -- to be called once per config from a project's `.nvim.lua` (requires -- `opt.exrc` - see options.lua - and trusting the file once via -- `:help :trust`). One call registers both an overseer run task and a -- matching nvim-dap debug config, so a project states its command once -- instead of repeating it across a separate run-file and debug-file. -- -- Example .nvim.lua (script invocation): -- require("config.project_run").python({ -- name = "Run app", -- program = vim.fn.getcwd() .. "/main.py", -- args = { "--flag" }, -- optional, shared by both run and debug -- }) -- -- Example .nvim.lua (module invocation, `python -m `): -- require("config.project_run").python({ -- name = "Run app", -- module = "fastapi", -- args = { "dev", "app" }, -- }) -- -- This shows "Run app" in the rr picker (plain execution) and in -- the dc picker (same script/module, under debugpy, breakpoints -- included). If /.venv exists, both get VIRTUAL_ENV/PATH pointed at -- it, same as `uv run` (or `source .venv/bin/activate`) would - and the -- debug config additionally gets pythonPath set to that venv's interpreter, -- since debugpy runs the script with the literal interpreter it's told -- rather than resolving `python3` via PATH. -- -- Example .nvim.lua (Node, script invocation): -- require("config.project_run").node({ -- name = "Run app", -- program = vim.fn.getcwd() .. "/index.js", -- args = { "--flag" }, -- optional, shared by both run and debug -- }) -- -- Example .nvim.lua (Node, `npm run