nvim: Update which-key mapping functions
Use new which-key mapping `.add()` functions after `.register()` has been deprecated with which-key 3.0.0.
This commit is contained in:
parent
d45d220b52
commit
7a051952fc
10 changed files with 46 additions and 49 deletions
|
|
@ -94,10 +94,11 @@ local prose_plugs = {
|
|||
"mickael-menu/zk-nvim",
|
||||
config = function()
|
||||
if require("core.util").is_available("which-key") then
|
||||
local prefix = require("which-key").register
|
||||
prefix({ ["<leader>n"] = { name = "+notes" } })
|
||||
prefix({ ["<localleader>n"] = { name = "+note" } })
|
||||
prefix({ ["<localleader>n"] = { name = "+note", mode = "v" } })
|
||||
require("which-key").add({
|
||||
{ "<leader>n", group = "notes" },
|
||||
{ "<localleader>n", group = "note" },
|
||||
{ "<localleader>n", group = "note", mode = "v" },
|
||||
})
|
||||
|
||||
require("zk.commands").add("ZkOrphans", function(opts)
|
||||
opts = vim.tbl_extend("force", { orphan = true }, opts or {})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue