Add python-dap

This commit is contained in:
Fernando Muñoz Paredes 2024-04-30 00:24:44 +02:00
parent 8ff9c94f8f
commit 745201acb3
2 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,7 @@ return {
'linux-cultist/venv-selector.nvim',
dependencies = { 'neovim/nvim-lspconfig', 'nvim-telescope/telescope.nvim', 'mfussenegger/nvim-dap-python' },
opts = {
dap_enabled = true, -- makes the debugger work with venv
-- Your options go here
-- name = "venv",
-- auto_refresh = false

View File

@ -23,6 +23,7 @@ return {
-- Add your own debuggers here
'leoluz/nvim-dap-go',
'mfussenegger/nvim-dap-python'
},
config = function()
local dap = require 'dap'
@ -42,6 +43,7 @@ return {
ensure_installed = {
-- Update this to ensure that you have the debuggers for the langs you want
'delve',
'debugpy'
},
}
@ -83,8 +85,10 @@ return {
dap.listeners.after.event_initialized['dapui_config'] = dapui.open
dap.listeners.before.event_terminated['dapui_config'] = dapui.close
dap.listeners.before.event_exited['dapui_config'] = dapui.close
local debugpyPythonPath = require("mason-registry").get_package("debugpy"):get_install_path() .. "/venv/bin/python3"
-- Install golang specific config
require('dap-go').setup()
require("dap-python").setup(debugpyPythonPath, {})
end,
}