mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
feat(which-key): easier integration for which-key group names
This commit is contained in:
parent
29ec138f8e
commit
df94a044ec
2 changed files with 18 additions and 10 deletions
|
@ -218,11 +218,7 @@ return {
|
|||
event = "VeryLazy",
|
||||
opts = {
|
||||
plugins = { spelling = true },
|
||||
},
|
||||
config = function(_, opts)
|
||||
local wk = require("which-key")
|
||||
wk.setup(opts)
|
||||
local keymaps = {
|
||||
defaults = {
|
||||
mode = { "n", "v" },
|
||||
["g"] = { name = "+goto" },
|
||||
["gz"] = { name = "+surround" },
|
||||
|
@ -239,11 +235,12 @@ return {
|
|||
["<leader>u"] = { name = "+ui" },
|
||||
["<leader>w"] = { name = "+windows" },
|
||||
["<leader>x"] = { name = "+diagnostics/quickfix" },
|
||||
}
|
||||
if Util.has("noice.nvim") then
|
||||
keymaps["<leader>sn"] = { name = "+noice" }
|
||||
end
|
||||
wk.register(keymaps)
|
||||
},
|
||||
},
|
||||
config = function(_, opts)
|
||||
local wk = require("which-key")
|
||||
wk.setup(opts)
|
||||
wk.register(opts.defaults)
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue