From aa45a63d638f965f7d2883bfa86cbbf7e045adb6 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Thu, 22 Aug 2024 17:40:10 +0100 Subject: [PATCH] hotfix: update for latest version of which-key --- lua/core/keybinds.lua | 67 +++++++++++++++++-------------------------- 1 file changed, 27 insertions(+), 40 deletions(-) diff --git a/lua/core/keybinds.lua b/lua/core/keybinds.lua index 97bc793..c4108fb 100644 --- a/lua/core/keybinds.lua +++ b/lua/core/keybinds.lua @@ -1,42 +1,29 @@ local wk = require("which-key") -wk.register({ - f = { - name = "file", - f = { "Telescope find_files", "Find File (~)" }, - a = { "Telescope find_files hidden=true search_dirs=~", "Find Hidden (~)" }, - p = { "Telescope find_files hidden=true", "Find File" }, - g = { "Telescope live_grep", "Find Word" }, - s = { ":w!", "Force Write" }, - w = { ":w", "Write" }, - - e = { ":e ", "Edit File", silent = false }, - }, - t = { - name = "tabs", - n = { "tabnew", "New Tab" }, - j = { "BufferPrevious", "Previous" }, - k = { "BufferNext", "Next" }, - h = { "BufferMovePrevious", "Move Previous" }, - l = { "BufferMoveNext", "Move Next" }, - }, - b = { - name = "buffers", - d = { "BufferDelete!", "Delete" }, - c = { "BufferClose!", "Close" }, - }, - r = { - name = "tree", - t = { "NvimTreeToggle", "Toggle" }, - f = { "NvimTreeFocus", "Focus" }, - }, - g = { - name = "git", - g = { "Neogit", "Neogit" }, - }, - e = { - name = "editor", - c = { "noh", "Clear Search" }, - }, - ["."] = { ":e ", "Edit File", silent = false }, -}, { prefix = "" }) +wk.add({ + { ".", ":e ", desc = "Edit File", silent = false }, + { "b", group = "buffers" }, + { "bc", "BufferClose!", desc = "Close" }, + { "bd", "BufferDelete!", desc = "Delete" }, + { "e", group = "editor" }, + { "ec", "noh", desc = "Clear Search" }, + { "f", group = "file" }, + { "fa", "Telescope find_files hidden=true search_dirs=~", desc = "Find Hidden (~)" }, + { "fe", ":e ", desc = "Edit File", silent = false }, + { "ff", "Telescope find_files", desc = "Find File (~)" }, + { "fg", "Telescope live_grep", desc = "Find Word" }, + { "fp", "Telescope find_files hidden=true", desc = "Find File" }, + { "fs", ":w!", desc = "Force Write" }, + { "fw", ":w", desc = "Write" }, + { "g", group = "git" }, + { "gg", "Neogit", desc = "Neogit" }, + { "r", group = "tree" }, + { "rf", "NvimTreeFocus", desc = "Focus" }, + { "rt", "NvimTreeToggle", desc = "Toggle" }, + { "t", group = "tabs" }, + { "th", "BufferMovePrevious", desc = "Move Previous" }, + { "tj", "BufferPrevious", desc = "Previous" }, + { "tk", "BufferNext", desc = "Next" }, + { "tl", "BufferMoveNext", desc = "Move Next" }, + { "tn", "tabnew", desc = "New Tab" }, +})