1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-23 16:06:48 +00:00
dotfiles/.config/nvim/lua/plugins/dap.lua

43 lines
915 B
Lua
Raw Normal View History

2023-04-12 18:09:30 +00:00
local dap = require("dap")
local dapui = require("dapui")
2022-10-01 11:46:18 +00:00
2024-02-10 15:15:03 +00:00
local debugpyPythonPath = require("mason-registry").get_package("debugpy"):get_install_path() .. "/venv/bin/python3"
require("dap-python").setup(debugpyPythonPath, {})
2022-11-05 12:30:40 +00:00
dapui.setup({
layouts = {
{
elements = {
{ id = "scopes", size = 0.25 },
"watches",
"stacks",
"breakpoints",
},
size = 50, -- columns
position = "left",
},
{
elements = {
"repl",
-- "console",
},
size = 0.25, -- 25% of total lines
position = "bottom",
},
},
})
2022-10-01 11:46:18 +00:00
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticSignError", linehl = "", numhl = "" })
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end