mirror of
https://github.com/LazyVim/LazyVim.git
synced 2025-06-22 08:53:33 +02:00
fix(which-key): only add noice group when noice is enabled
This commit is contained in:
parent
2e18998c9e
commit
38eb3bf115
1 changed files with 6 additions and 3 deletions
|
@ -176,7 +176,7 @@ return {
|
|||
config = function(_, opts)
|
||||
local wk = require("which-key")
|
||||
wk.setup(opts)
|
||||
wk.register({
|
||||
local keymaps = {
|
||||
mode = { "n", "v" },
|
||||
["g"] = { name = "+goto" },
|
||||
["gz"] = { name = "+surround" },
|
||||
|
@ -190,11 +190,14 @@ return {
|
|||
["<leader>gh"] = { name = "+hunks" },
|
||||
["<leader>q"] = { name = "+quit/session" },
|
||||
["<leader>s"] = { name = "+search" },
|
||||
["<leader>sn"] = { name = "+noice" },
|
||||
["<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)
|
||||
end,
|
||||
},
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue