summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/core/dap.lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua/core/dap.lua')
-rw-r--r--.config/nvim/lua/core/dap.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/.config/nvim/lua/core/dap.lua b/.config/nvim/lua/core/dap.lua
index bc76e22..a325c7c 100644
--- a/.config/nvim/lua/core/dap.lua
+++ b/.config/nvim/lua/core/dap.lua
@@ -1,6 +1,7 @@
local M = {}
+local Log = require "core.log"
M.config = function()
- O.plugin.dap = {
+ options.builtin.dap = {
active = false,
breakpoint = {
text = "",
@@ -14,13 +15,14 @@ end
M.setup = function()
local status_ok, dap = pcall(require, "dap")
if not status_ok then
+ Log:get_default().error "Failed to load dap"
return
end
- vim.fn.sign_define("DapBreakpoint", O.plugin.dap.breakpoint)
+ vim.fn.sign_define("DapBreakpoint", options.builtin.dap.breakpoint)
dap.defaults.fallback.terminal_win_cmd = "50vsplit new"
- O.user_which_key["d"] = {
+ options.builtin.which_key.mappings["d"] = {
name = "Debug",
t = { "<cmd>lua require'dap'.toggle_breakpoint()<cr>", "Toggle Breakpoint" },
b = { "<cmd>lua require'dap'.step_back()<cr>", "Step Back" },
@@ -34,7 +36,7 @@ M.setup = function()
p = { "<cmd>lua require'dap'.pause.toggle()<cr>", "Pause" },
r = { "<cmd>lua require'dap'.repl.toggle()<cr>", "Toggle Repl" },
s = { "<cmd>lua require'dap'.continue()<cr>", "Start" },
- q = { "<cmd>lua require'dap'.stop()<cr>", "Quit" },
+ q = { "<cmd>lua require'dap'.close()<cr>", "Quit" },
}
end