From c7055d45f9863ec84bebe2bf37615b9dad0e0090 Mon Sep 17 00:00:00 2001 From: Joshua Finch Date: Sat, 26 Jul 2025 20:30:10 -0500 Subject: [PATCH] fix: Fixing the python DAP config as it was just not functioning correctly with the Mason setup. --- nvim/lua/plugins/dap-python.lua | 2 +- nvim/lua/plugins/dap.lua | 20 +++++++++----------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/nvim/lua/plugins/dap-python.lua b/nvim/lua/plugins/dap-python.lua index 69551d3..e707e20 100644 --- a/nvim/lua/plugins/dap-python.lua +++ b/nvim/lua/plugins/dap-python.lua @@ -1,6 +1,6 @@ return { 'mfussenegger/nvim-dap-python', config = function() - require('dap-python').setup('~/.virtualenvs/debugpy/bin/python') + require('dap-python').setup('~/.local/share/nvim/mason/packages/debugpy/venv/bin/python') end, } diff --git a/nvim/lua/plugins/dap.lua b/nvim/lua/plugins/dap.lua index b62863e..d51f3dd 100644 --- a/nvim/lua/plugins/dap.lua +++ b/nvim/lua/plugins/dap.lua @@ -127,19 +127,17 @@ return { python = { { type = 'python', + name = 'Launch current file', request = 'launch', - name = 'Launch file', program = '${file}', - pythonPath = function() - local cwd = vim.fn.getcwd() - if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then - return cwd .. '/venv/bin/python' - elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then - return cwd .. '/.venv/bin/python' - else - return '/usr/bin/python' - end - end, + -- pythonPath = function() + -- local cwd = vim.fn.getcwd() + -- if vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then + -- return cwd .. '/.venv/bin/python' + -- else + -- return '/usr/bin/python' + -- end + -- end, } } }