From ed05721db180d8ccb337260b18d24de1de1519dc Mon Sep 17 00:00:00 2001 From: Daniel McKnight Date: Sun, 15 Jun 2025 19:18:36 -0700 Subject: [PATCH] Add F-key mappings to mostly match VSCode --- .config/nvim/init.lua | 22 ++++++++++++++++++++++ .config/nvim/lua/plugins/debugging.lua | 8 ++++++++ 2 files changed, 30 insertions(+) diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua index c72c318..6502efa 100644 --- a/.config/nvim/init.lua +++ b/.config/nvim/init.lua @@ -64,3 +64,25 @@ vim.keymap.set("n", "ce", ":Copilot enable", { desc = "Enable Copilo vim.keymap.set("n", "cd", ":Copilot disable", { desc = "Disable Copilot Completions" }) vim.keymap.set("n", "cc", ":CopilotChatToggle", { desc = "Toggle Copilot Chat" }) vim.keymap.set("n", "cx", ":CopilotChatReset", { desc = "Reset Copilot Chat" }) + +-- Configure f-key shortcuts +vim.keymap.set("n", "", vim.lsp.buf.hover) +vim.keymap.set("i", "", vim.lsp.buf.hover) +vim.keymap.set("n", "", vim.lsp.buf.rename) +vim.keymap.set("i", "", vim.lsp.buf.rename) +vim.keymap.set("n", "", "") +vim.keymap.set("i", "", "") +vim.keymap.set("n", "", "") +vim.keymap.set("i", "", "") +vim.keymap.set("n", "", ":BufferClose") +vim.keymap.set("i", "", ":BufferClose") +vim.keymap.set("n", "", ":Gitsigns next_hunk") +vim.keymap.set("i", "", ":Gitsigns next_hunk") +vim.keymap.set("n", "", ":Gitsigns prev_hunk") +vim.keymap.set("i", "", ":Gitsigns prev_hunk") +vim.keymap.set("n", "", vim.diagnostic.goto_next) +vim.keymap.set("i", "", vim.diagnostic.goto_next) +vim.keymap.set("n", "", vim.diagnostic.goto_prev) +vim.keymap.set("i", "", vim.diagnostic.goto_prev) +vim.keymap.set("n", "", vim.lsp.buf.definition) +vim.keymap.set("i", "", vim.lsp.buf.definition) diff --git a/.config/nvim/lua/plugins/debugging.lua b/.config/nvim/lua/plugins/debugging.lua index 5b1431e..444d39e 100644 --- a/.config/nvim/lua/plugins/debugging.lua +++ b/.config/nvim/lua/plugins/debugging.lua @@ -8,6 +8,14 @@ return { vim.keymap.set("n", "dc", dap.continue, { desc = "Start/Continue" }) vim.keymap.set("n", "do", dap.step_over, { desc = "Step Over" }) vim.keymap.set("n", "di", dap.step_into, { desc = "Step Into" }) + vim.keymap.set("n", "", dap.toggle_breakpoint) + vim.keymap.set("i", "", dap.toggle_breakpoint) + vim.keymap.set("n", "", dap.continue) + vim.keymap.set("i", "", dap.continue) + vim.keymap.set("n", "", dap.step_over) + vim.keymap.set("i", "", dap.step_over) + vim.keymap.set("n", "", dap.step_into) + vim.keymap.set("i", "", dap.step_into) vim.keymap.set("n", "dt", dap.terminate, { desc = "Terminate Session" }) end, },