fix: Fixing the python DAP config as it was just not functioning
correctly with the Mason setup.
This commit is contained in:
parent
0b14709875
commit
c7055d45f9
@ -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,
|
||||
}
|
||||
|
||||
@ -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,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user