From e356a7f53916a378406199c852647b27e7b87139 Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 29 Dec 2024 16:35:58 +0100 Subject: [PATCH] Fix setup for python debugpy --- after/plugin/dap/dap-python.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/after/plugin/dap/dap-python.lua b/after/plugin/dap/dap-python.lua index 6d124d3..e72b3a3 100644 --- a/after/plugin/dap/dap-python.lua +++ b/after/plugin/dap/dap-python.lua @@ -1 +1,8 @@ -require('dap-python').setup("python") +local python = "python" + +if vim.env.VIRTUAL_ENV +then + python = vim.env.VIRTUAL_ENV .. "/bin/python" +end + +require('dap-python').setup(python)