fixed dap config

This commit is contained in:
Oliver Hartmann 2024-04-26 09:15:57 +00:00
parent 4dc7351d8b
commit 57eb3586d9

View File

@ -3,7 +3,12 @@ return {
dependencies = { dependencies = {
'mfussenegger/nvim-dap-python', 'mfussenegger/nvim-dap-python',
'theHamsta/nvim-dap-virtual-text', 'theHamsta/nvim-dap-virtual-text',
'rcarriga/nvim-dap-ui', {
'rcarriga/nvim-dap-ui',
dependencies = {
'nvim-neotest/nvim-nio'
}
},
'rcarriga/cmp-dap', 'rcarriga/cmp-dap',
}, },
keys = { keys = {
@ -95,7 +100,7 @@ return {
config.pythonPath = pythonVenv.getPythonEnv() config.pythonPath = pythonVenv.getPythonEnv()
config.cwd = vim.fn.getcwd() config.cwd = vim.fn.getcwd()
end end
require ('fzf-lua').dap_configurations() require('fzf-lua').dap_configurations()
end end
local masonpath = vim.fn.stdpath('data') .. '/mason' local masonpath = vim.fn.stdpath('data') .. '/mason'
@ -103,7 +108,7 @@ return {
-- PYTHON -- PYTHON
dap.adapters.python = { dap.adapters.python = {
type = 'executable', type = 'executable',
command = masonpath .. '/packages/debugpy/venv/' .. pythonVenv.getVenvSuffix(), command = 'python',
args = { '-m', 'debugpy.adapter' }, args = { '-m', 'debugpy.adapter' },
options = { options = {
detached = true, detached = true,
@ -150,7 +155,7 @@ return {
type = 'server', type = 'server',
port = '${port}', port = '${port}',
executable = { executable = {
command = require'mason-core.path'.bin_prefix'codelldb'; command = require 'mason-core.path'.bin_prefix 'codelldb',
args = { '--port', '${port}' }, args = { '--port', '${port}' },
-- On windows you may have to uncomment this: -- On windows you may have to uncomment this:
@ -182,7 +187,7 @@ return {
type = 'codelldb', type = 'codelldb',
request = 'launch', request = 'launch',
program = function() program = function()
return vim.fn.input({'Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file'}) return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim/', 'file' })
end, end,
cwd = '${workspaceFolder}', cwd = '${workspaceFolder}',
stopOnEntry = false, stopOnEntry = false,
@ -192,7 +197,7 @@ return {
type = 'lldb', type = 'lldb',
request = 'launch', request = 'launch',
program = function() program = function()
return vim.fn.input({'Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file'}) return vim.fn.input({ 'Path to executable: ', vim.fn.getcwd() .. '/build_nvim', 'file' })
end, end,
cwd = '${workspaceFolder}', cwd = '${workspaceFolder}',
stopOnEntry = false, stopOnEntry = false,