diff --git a/lua/lazyvim/plugins/editor.lua b/lua/lazyvim/plugins/editor.lua index d2c9413e..27909eb2 100644 --- a/lua/lazyvim/plugins/editor.lua +++ b/lua/lazyvim/plugins/editor.lua @@ -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 { ["gh"] = { name = "+hunks" }, ["q"] = { name = "+quit/session" }, ["s"] = { name = "+search" }, - ["sn"] = { name = "+noice" }, ["u"] = { name = "+ui" }, ["w"] = { name = "+windows" }, ["x"] = { name = "+diagnostics/quickfix" }, - }) + } + if Util.has("noice.nvim") then + keymaps["sn"] = { name = "+noice" } + end + wk.register(keymaps) end, },