From 6e92e847a32742d6e11fb07981033a6f368c7bdb Mon Sep 17 00:00:00 2001 From: Alexander Gehrke Date: Fri, 19 Sep 2025 14:56:24 +0200 Subject: [PATCH] Key bindings for buffer nav and m-Enter for code actions --- init.lua | 3 +++ plugin/on-attach.lua | 1 + 2 files changed, 4 insertions(+) diff --git a/init.lua b/init.lua index 967f158..3cc32c6 100644 --- a/init.lua +++ b/init.lua @@ -152,3 +152,6 @@ key("n", "Y", "y$") key("i", "", "", { desc = "completion" }) key("n", "", "nohredraw!", { desc = "clear search highlight" }) key("v", "gs", "'<,'>sort", { desc = "sort selection" }) + +key("n", "", "bnext", { desc = "next buffer" }) +key("n", "", "bprevious", { desc = "previous buffer" }) diff --git a/plugin/on-attach.lua b/plugin/on-attach.lua index 3d52187..e4bdd11 100644 --- a/plugin/on-attach.lua +++ b/plugin/on-attach.lua @@ -25,6 +25,7 @@ local on_attach = function(args) { 'D', vim.lsp.buf.type_definition, "Go to type definition" }, { 'rn', vim.lsp.buf.rename, "Rename" }, { '', vim.lsp.buf.code_action, "Code action" }, + { '', vim.lsp.buf.code_action, "Code action" }, { '', vim.lsp.codelens.run, "Run code lens" }, { 'gr', function() require('telescope.builtin').lsp_references() end,"Go to references" }, { '', vim.diagnostic.open_float, "Open diagnostics" },