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 {
|
return {
|
||||||
'mfussenegger/nvim-dap-python',
|
'mfussenegger/nvim-dap-python',
|
||||||
config = function()
|
config = function()
|
||||||
require('dap-python').setup('~/.virtualenvs/debugpy/bin/python')
|
require('dap-python').setup('~/.local/share/nvim/mason/packages/debugpy/venv/bin/python')
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
@ -127,19 +127,17 @@ return {
|
|||||||
python = {
|
python = {
|
||||||
{
|
{
|
||||||
type = 'python',
|
type = 'python',
|
||||||
|
name = 'Launch current file',
|
||||||
request = 'launch',
|
request = 'launch',
|
||||||
name = 'Launch file',
|
|
||||||
program = '${file}',
|
program = '${file}',
|
||||||
pythonPath = function()
|
-- pythonPath = function()
|
||||||
local cwd = vim.fn.getcwd()
|
-- local cwd = vim.fn.getcwd()
|
||||||
if vim.fn.executable(cwd .. '/venv/bin/python') == 1 then
|
-- if vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then
|
||||||
return cwd .. '/venv/bin/python'
|
-- return cwd .. '/.venv/bin/python'
|
||||||
elseif vim.fn.executable(cwd .. '/.venv/bin/python') == 1 then
|
-- else
|
||||||
return cwd .. '/.venv/bin/python'
|
-- return '/usr/bin/python'
|
||||||
else
|
-- end
|
||||||
return '/usr/bin/python'
|
-- end,
|
||||||
end
|
|
||||||
end,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user