forked from LunarVim/Launch.nvim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dap.lua
50 lines (41 loc) · 1.05 KB
/
dap.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
local dap_status_ok, dap = pcall(require, "dap")
if not dap_status_ok then
return
end
local dap_ui_status_ok, dapui = pcall(require, "dapui")
if not dap_ui_status_ok then
return
end
local dap_install_status_ok, dap_install = pcall(require, "dap-install")
if not dap_install_status_ok then
return
end
dap_install.setup {}
dap_install.config("python", {})
-- add other configs here
dapui.setup {
sidebar = {
elements = {
{
id = "scopes",
size = 0.25, -- Can be float or integer > 1
},
{ id = "breakpoints", size = 0.25 },
},
size = 40,
position = "right", -- Can be "left", "right", "top", "bottom"
},
tray = {
elements = {},
},
}
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