1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-11-15 09:11:12 +00:00
dotfiles/.config/nvim/lua/plugins/dap.lua

49 lines
1.1 KiB
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 = "" })
vim.fn.sign_define("DapStopped", { text = "󰔰", texthl = "DiagnosticSignWarn", linehl = "", numhl = "" })
2022-10-01 11:46:18 +00:00
2024-03-22 19:24:02 +00:00
dap.listeners.after.event_initialized.dapui_config = function()
2022-10-01 11:46:18 +00:00
dapui.open()
end
2024-03-22 19:24:02 +00:00
dap.listeners.before.attach.dapui_config = function()
2024-03-29 16:57:32 +00:00
dapui.open()
2022-10-01 11:46:18 +00:00
end
2024-03-22 19:24:02 +00:00
dap.listeners.before.launch.dapui_config = function()
2024-03-29 16:57:32 +00:00
dapui.open()
2024-03-22 19:24:02 +00:00
end
dap.listeners.before.event_terminated.dapui_config = function()
2024-03-29 16:57:32 +00:00
dapui.close()
2024-03-22 19:24:02 +00:00
end
dap.listeners.before.event_exited.dapui_config = function()
2024-03-29 16:57:32 +00:00
dapui.close()
2022-10-01 11:46:18 +00:00
end