From b1690381850f011abad0bb3e94c03e99a9101e98 Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Fri, 25 Sep 2026 17:59:19 +0200 Subject: Added helm stuff --- neovim/.config/nvim/lua/config/project_run.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'neovim/.config/nvim/lua/config') diff --git a/neovim/.config/nvim/lua/config/project_run.lua b/neovim/.config/nvim/lua/config/project_run.lua index 40c1795..b7c2560 100644 --- a/neovim/.config/nvim/lua/config/project_run.lua +++ b/neovim/.config/nvim/lua/config/project_run.lua @@ -63,7 +63,12 @@ function M.python(opts) local venv = venv_dir() local env = venv and venv_env(venv) or nil - local cmd = opts.module and { "python3", "-m", opts.module } or { "python3", opts.program } + -- Resolve the interpreter to the venv's own binary rather than relying on + -- env.PATH below: jobstart/libuv resolves a bare "python3" against the + -- *parent* process's PATH, not the child job's env, so a PATH override + -- alone silently falls through to the system interpreter. + local python = venv and (venv .. "/bin/python3") or "python3" + local cmd = opts.module and { python, "-m", opts.module } or { python, opts.program } require("overseer").register_template({ name = opts.name, @@ -90,8 +95,9 @@ function M.python(opts) -- nvim-dap-python only auto-detects an interpreter (VIRTUAL_ENV env var, -- then a venv/.venv/env/.env folder search) when pythonPath/python isn't -- already set - and debugpy needs the literal interpreter path here - -- regardless (it spawns it directly, not through a shell that'd resolve - -- `python3` via PATH the way env.PATH above does for the overseer task). + -- regardless, same reason `cmd` above uses the venv binary directly + -- rather than a bare `python3` resolved via env.PATH: it spawns the + -- interpreter directly, not through a shell that'd do that resolution. -- Set it explicitly from the same .venv we already found, so debugging -- doesn't depend on that separate heuristic agreeing with us - without -- this, a missed/wrong guess falls back to debugpy's own adapter venv, -- cgit v1.3