From a50e86aebbe3f05ae8222638668e11a2513b434c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Sat, 30 Apr 2022 23:26:57 +0200 Subject: [PATCH] Add zig dap configuration --- symlinks/config/nvim/plugin/dap.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/symlinks/config/nvim/plugin/dap.lua b/symlinks/config/nvim/plugin/dap.lua index b14dd65..5075857 100644 --- a/symlinks/config/nvim/plugin/dap.lua +++ b/symlinks/config/nvim/plugin/dap.lua @@ -44,7 +44,12 @@ end dap.listeners.after["event_terminated"]["me"] = function() for _, keymap in pairs(keymap_restore) do - vim.keymap.set(keymap.mode, keymap.lhs, keymap.rhs, { silent = keymap.silent == 1, buffer = keymap.buffer }) + vim.keymap.set( + keymap.mode, + keymap.lhs, + keymap.callback or keymap.rhs, + { silent = keymap.silent == 1, buffer = keymap.buffer } + ) end keymap_restore = {} end @@ -122,6 +127,7 @@ dap.configurations.cpp = { dap.configurations.c = dap.configurations.cpp dap.configurations.rust = dap.configurations.cpp +dap.configurations.zig = dap.configurations.cpp dap.listeners.after.event_initialized["dapui_config"] = function() dapui.open()