hotfix: update for latest version of which-key

This commit is contained in:
Muhammad Nauman Raza 2024-08-22 17:40:10 +01:00
parent b6b296f96c
commit aa45a63d63
Signed by: devraza
GPG key ID: 91EAD6081011574B

View file

@ -1,42 +1,29 @@
local wk = require("which-key") local wk = require("which-key")
wk.register({ wk.add({
f = { { "<leader>.", ":e ", desc = "Edit File", silent = false },
name = "file", { "<leader>b", group = "buffers" },
f = { "<cmd>Telescope find_files<cr>", "Find File (~)" }, { "<leader>bc", "<cmd>BufferClose!<cr>", desc = "Close" },
a = { "<cmd>Telescope find_files hidden=true search_dirs=~<cr>", "Find Hidden (~)" }, { "<leader>bd", "<cmd>BufferDelete!<cr>", desc = "Delete" },
p = { "<cmd>Telescope find_files hidden=true<cr>", "Find File" }, { "<leader>e", group = "editor" },
g = { "<cmd>Telescope live_grep<cr>", "Find Word" }, { "<leader>ec", "<cmd>noh<cr>", desc = "Clear Search" },
s = { "<cmd>:w!<cr>", "Force Write" }, { "<leader>f", group = "file" },
w = { "<cmd>:w<cr>", "Write" }, { "<leader>fa", "<cmd>Telescope find_files hidden=true search_dirs=~<cr>", desc = "Find Hidden (~)" },
{ "<leader>fe", ":e ", desc = "Edit File", silent = false },
e = { ":e ", "Edit File", silent = false }, { "<leader>ff", "<cmd>Telescope find_files<cr>", desc = "Find File (~)" },
}, { "<leader>fg", "<cmd>Telescope live_grep<cr>", desc = "Find Word" },
t = { { "<leader>fp", "<cmd>Telescope find_files hidden=true<cr>", desc = "Find File" },
name = "tabs", { "<leader>fs", "<cmd>:w!<cr>", desc = "Force Write" },
n = { "<cmd>tabnew<cr>", "New Tab" }, { "<leader>fw", "<cmd>:w<cr>", desc = "Write" },
j = { "<cmd>BufferPrevious<cr>", "Previous" }, { "<leader>g", group = "git" },
k = { "<cmd>BufferNext<cr>", "Next" }, { "<leader>gg", "<cmd>Neogit<cr>", desc = "Neogit" },
h = { "<cmd>BufferMovePrevious<cr>", "Move Previous" }, { "<leader>r", group = "tree" },
l = { "<cmd>BufferMoveNext<cr>", "Move Next" }, { "<leader>rf", "<cmd>NvimTreeFocus<cr>", desc = "Focus" },
}, { "<leader>rt", "<cmd>NvimTreeToggle<cr>", desc = "Toggle" },
b = { { "<leader>t", group = "tabs" },
name = "buffers", { "<leader>th", "<cmd>BufferMovePrevious<cr>", desc = "Move Previous" },
d = { "<cmd>BufferDelete!<cr>", "Delete" }, { "<leader>tj", "<cmd>BufferPrevious<cr>", desc = "Previous" },
c = { "<cmd>BufferClose!<cr>", "Close" }, { "<leader>tk", "<cmd>BufferNext<cr>", desc = "Next" },
}, { "<leader>tl", "<cmd>BufferMoveNext<cr>", desc = "Move Next" },
r = { { "<leader>tn", "<cmd>tabnew<cr>", desc = "New Tab" },
name = "tree", })
t = { "<cmd>NvimTreeToggle<cr>", "Toggle" },
f = { "<cmd>NvimTreeFocus<cr>", "Focus" },
},
g = {
name = "git",
g = { "<cmd>Neogit<cr>", "Neogit" },
},
e = {
name = "editor",
c = { "<cmd>noh<cr>", "Clear Search" },
},
["."] = { ":e ", "Edit File", silent = false },
}, { prefix = "<leader>" })