From 2e6c59d0c61ce69a7934208ad26552f0739a7fdb Mon Sep 17 00:00:00 2001 From: Warwick Date: Thu, 29 Aug 2024 10:25:28 +0100 Subject: [PATCH] Added debugging tools for C can't test on debian cuz gdb too old on stable --- lua/core/plugin_config/init.lua | 1 + lua/core/plugin_config/whichkey.lua | 39 +++++++++++++++++------------ lua/core/plugins.lua | 10 +++++++- 3 files changed, 33 insertions(+), 17 deletions(-) diff --git a/lua/core/plugin_config/init.lua b/lua/core/plugin_config/init.lua index 66b0ac7..2efbf16 100644 --- a/lua/core/plugin_config/init.lua +++ b/lua/core/plugin_config/init.lua @@ -11,3 +11,4 @@ require("core.plugin_config.treesitter") require("core.plugin_config.lsp_config") require("core.plugin_config.completions") require("core.plugin_config.whichkey") +require("core.plugin_config.dap-debug") diff --git a/lua/core/plugin_config/whichkey.lua b/lua/core/plugin_config/whichkey.lua index ab02461..7b7c50a 100644 --- a/lua/core/plugin_config/whichkey.lua +++ b/lua/core/plugin_config/whichkey.lua @@ -68,22 +68,29 @@ local keymap = { }, v = { name = '+obsidian Vault', - i = {'e ~/Sync/wiki/index.md', 'Open Index'}, - o = {'ObsidianOpen', 'Obsidian Open'}, - n = {'ObsidianNew', 'New Note'}, - q = {'ObsidianQuickSwitch', 'Quick Switch with fzf'}, - f = {'ObsidianFollowLink', 'Follow Link'}, - b = {'ObsidianBacklinks', 'List Backlinks'}, - d = {'ObsidianToday', 'Open Daily Note'}, - y = {'ObsidianYesterday', 'Open Yesterdays Note'}, - t = {'ObsidianTomorrow', 'Open Tomorrows Note'}, - T = {'ObsidianTemplate', 'Open Template'}, - s = {'ObsidianSearch', 'Search Notes'}, - l = {'ObsidianLink', 'Link Current Selection'}, - L = {'ObsidianLinkNew', 'Link New Note from Current Selection'}, - w = {'ObsidianWorkspace', 'Switch Workspace'}, - p = {'ObsidianPasteImg', 'Paste Image'}, - r = {'ObsidianRename', 'Rename Note'}, + i = { 'e ~/Sync/wiki/index.md', 'Open Index' }, + o = { 'ObsidianOpen', 'Obsidian Open' }, + n = { 'ObsidianNew', 'New Note' }, + q = { 'ObsidianQuickSwitch', 'Quick Switch with fzf' }, + f = { 'ObsidianFollowLink', 'Follow Link' }, + b = { 'ObsidianBacklinks', 'List Backlinks' }, + d = { 'ObsidianToday', 'Open Daily Note' }, + y = { 'ObsidianYesterday', 'Open Yesterdays Note' }, + t = { 'ObsidianTomorrow', 'Open Tomorrows Note' }, + T = { 'ObsidianTemplate', 'Open Template' }, + s = { 'ObsidianSearch', 'Search Notes' }, + l = { 'ObsidianLink', 'Link Current Selection' }, + L = { 'ObsidianLinkNew', 'Link New Note from Current Selection' }, + w = { 'ObsidianWorkspace', 'Switch Workspace' }, + p = { 'ObsidianPasteImg', 'Paste Image' }, + r = { 'ObsidianRename', 'Rename Note' }, + }, + d = { + name = 'DAP debug tools', + c = { function() require('dap').continue() end, 'continue/launch' }, + o = { function() require('dap').step_over() end, 'continue/launch' }, + i = { function() require('dap').step_into() end, 'continue/launch' }, + b = { function() require('dap').toggle_breakpoint() end, 'continue/launch' }, } } -- Map window keys to leader w diff --git a/lua/core/plugins.lua b/lua/core/plugins.lua index 0cbcea0..56713dc 100644 --- a/lua/core/plugins.lua +++ b/lua/core/plugins.lua @@ -88,7 +88,6 @@ local plugins = { "nvim-lua/plenary.nvim", }, }, - -- install without yarn or npm { "iamcco/markdown-preview.nvim", cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, @@ -134,6 +133,15 @@ local plugins = { }, { "sindrets/diffview.nvim" + }, + -- DAP Debugging Tools + { + "rcarriga/nvim-dap-ui", + dependencies = { + "mfussenegger/nvim-dap", + "nvim-neotest/nvim-nio", + "jay-babu/mason-nvim-dap.nvim" + } } }