From 540268d618627079c9b958a955b586e1888b46a8 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Tue, 10 Aug 2021 23:15:04 +0200 Subject: Major refactor of nvim --- .config/nvim/lua/core/dap.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to '.config/nvim/lua/core/dap.lua') 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 = { "lua require'dap'.toggle_breakpoint()", "Toggle Breakpoint" }, b = { "lua require'dap'.step_back()", "Step Back" }, @@ -34,7 +36,7 @@ M.setup = function() p = { "lua require'dap'.pause.toggle()", "Pause" }, r = { "lua require'dap'.repl.toggle()", "Toggle Repl" }, s = { "lua require'dap'.continue()", "Start" }, - q = { "lua require'dap'.stop()", "Quit" }, + q = { "lua require'dap'.close()", "Quit" }, } end -- cgit v1.2.3-70-g09d2