From e0cf6ac98380787e252274d7dda7b6b3430b86c4 Mon Sep 17 00:00:00 2001 From: pml68 Date: Tue, 19 Mar 2024 14:10:41 +0100 Subject: feat: add DAP keymaps --- lua/pml68/configs/dap.lua | 7 +++++++ lua/pml68/plugins.lua | 3 +++ lua/pml68/remap.lua | 6 ++---- 3 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 lua/pml68/configs/dap.lua (limited to 'lua/pml68') diff --git a/lua/pml68/configs/dap.lua b/lua/pml68/configs/dap.lua new file mode 100644 index 0000000..f78752e --- /dev/null +++ b/lua/pml68/configs/dap.lua @@ -0,0 +1,7 @@ +vim.keymap.set("n", "db", " DapToggleBreakpoint ") +vim.keymap.set("n", "dr", " DapContinue ") +vim.keymap.set("n", "dus", function() + local widgets = require("dap.ui.widgets") + local sidebar = widgets.sidebar(widgets.scope) + sidebar.open() +end) diff --git a/lua/pml68/plugins.lua b/lua/pml68/plugins.lua index 215d65d..fe432a5 100644 --- a/lua/pml68/plugins.lua +++ b/lua/pml68/plugins.lua @@ -211,6 +211,9 @@ local plugins = { -- Dap { "mfussenegger/nvim-dap", + init = function() + require("pml68.configs.dap") + end }, { "jay-babu/mason-nvim-dap.nvim", diff --git a/lua/pml68/remap.lua b/lua/pml68/remap.lua index dab15ca..7394e8c 100644 --- a/lua/pml68/remap.lua +++ b/lua/pml68/remap.lua @@ -6,14 +6,12 @@ vim.keymap.set("n", "cp", ":!xclip -sel clip -target image/png -i 2024*. vim.keymap.set("n", "u", "UndotreeToggle") -- keyboard problems (temporary) -function starting() +vim.keymap.set("n", "s", function() local pos = vim.api.nvim_win_get_cursor(0)[2] local line = vim.api.nvim_get_current_line() local nline = line:sub(0, pos) .. "<" .. line:sub(pos + 1) vim.api.nvim_set_current_line(nline) -end - -vim.keymap.set("n", "s", " lua starting() ") +end) -- switch between windows vim.keymap.set("n", "", "h") -- cgit v1.2.3