updated to the latest api version for which key

This commit is contained in:
aminnairi
2025-01-04 18:34:23 +01:00
parent 7b5c819612
commit 1bcf3ec5b7
5 changed files with 44 additions and 131 deletions
@@ -13,36 +13,27 @@ return {
local whichKey = require("which-key") local whichKey = require("which-key")
whichKey.register({ whichKey.register({
["<leader>b"] = { "<leader>b",
name = "Barbar", desc = "Barbar",
d = { {
"<cmd>BarbarDisable<cr>", "<leader>bc",
"Disable Barbar" desc = "Barbar Close",
{
"<leader>bcc",
"<cmd>BufferCloseAllButCurrent<cr>",
desc = "Barbar Close All But Current"
}, },
e = { {
"<cmd>BarbarEnable<cr>", "<leader>bcl",
"Enable Barbar" "<cmd>BufferCloseAllBuffersLeft<cr>",
desc = "Barbar Close All Buffers Left"
}, },
c = { {
name = "Close", "<leader>bcr",
c = { "<cmd>BufferCloseAllBuffersRight<cr>",
"<cmd>BufferCloseAllButCurrent<cr>", desc = "Barbar Close All Buffers Right"
"Close all buffers but the current one"
},
p = {
"<cmd>BufferCloseAllButPinned<cr>",
"Close all buffers but the pinned ones"
},
l = {
"<cmd>BufferCloseBuffersLeft<cr>",
"Close all buffers to the left"
},
r = {
"<cmd>BufferCloseBuffersRight<cr>",
"Close all buffers to the right"
}
} }
} },
}) })
map("n", "<A-,>", "<Cmd>BufferPrevious<CR>", opts) map("n", "<A-,>", "<Cmd>BufferPrevious<CR>", opts)
@@ -36,21 +36,23 @@ return {
}) })
require("which-key").register({ require("which-key").register({
["<leader>c"] = { "<leader>c",
name = "Cloak", desc = "Cloak",
t = { {
":CloakToggle<CR>", "<leader>ct",
"Toggle" ":CloakToggle<CR>",
}, desc = "Toggle Cloak"
d = { },
":CloakDisable<CR>", {
"Disable" "<leader>cd",
}, ":CloakDisable<CR>",
e = { desc = "Cloak disable"
":CloakEnable<CR>", },
"Enable" {
} "<leader>ce",
} ":CloakDisable<CR>",
desc = "Cloak enable"
},
}) })
end, end,
} }
@@ -14,21 +14,15 @@ return {
neogit.setup({}) neogit.setup({})
whichKey.register({ whichKey.register({
["<leader>g"] = { "<leader>g",
name = "Neogit", desc = "Neogit",
g = { {
function() "<leader>go",
neogit.open() function()
end, neogit.open()
"Open Neogit" end,
}, desc = "Neogit open"
c = { },
function()
neogit.open({ "commit" })
end,
"Open Neogit commit"
}
}
}) })
end end
} }
@@ -68,52 +68,5 @@ return {
["core.export"] = {} ["core.export"] = {}
}, },
}) })
require("which-key").register({
["<leader>o"] = {
name = "Neorg",
i = {
":Neorg index<CR>",
"Index"
},
r = {
":Neorg return<CR>",
"Return"
},
l = {
name = "List",
t = {
":Neorg keybind norg core.pivot.toggle-list-type",
"Toggle"
},
i = {
":Neorg keybind norg core.pivot.invert-list-type",
"Invert"
}
},
w = {
name = "Workspace",
n = {
":Neorg workspace notes",
"Notes"
},
d = {
":Neorg workspace default",
"Default"
}
},
p = {
name = "Presenter",
s = {
":Neorg presenter start<CR>",
"Start",
},
S = {
":Neorg presenter stop<CR>",
"Stop",
},
},
},
})
end, end,
} }
@@ -6,33 +6,6 @@ return {
vim.notify = notify vim.notify = notify
require("which-key").register({
["<leader>u"] = {
name = "User Interface",
n = {
name = "Notification",
e = {
function()
vim.notify = notify
end,
"Enable notifications"
},
d = {
function()
vim.notify = function() end
end,
"Disable notifications"
},
l = {
function()
require("telescope").extensions.notify.notify()
end,
"List notifications"
}
}
}
})
require("notify.config").setup({ require("notify.config").setup({
enabled = false, enabled = false,
stages = "fade_in_slide_out", stages = "fade_in_slide_out",