fix: which-key works now

This commit is contained in:
Noa Aarts 2024-07-23 21:43:46 +02:00
parent 446dd1ddbd
commit 3499df1856

View file

@ -211,18 +211,14 @@ require("lazy").setup({
{ -- Useful plugin to show you pending keybinds. { -- Useful plugin to show you pending keybinds.
"folke/which-key.nvim", "folke/which-key.nvim",
event = "VeryLazy", -- Sets the loading event to 'VeryLazy' event = "VeryLazy", -- Sets the loading event to 'VeryLazy'
config = function() -- This is the function that runs, AFTER loading opts = {},
require("which-key").setup() keys = {
{ "<leader>c", name = "[C]ode" },
-- Document existing key chains { "<leader>d", name = "[D]ocument" },
require("which-key").register({ { "<leader>r", name = "[R]ename" },
["<leader>c"] = { name = "[C]ode", _ = "which_key_ignore" }, { "<leader>s", name = "[S]earch" },
["<leader>d"] = { name = "[D]ocument", _ = "which_key_ignore" }, { "<leader>w", name = "[W]orkspace" },
["<leader>r"] = { name = "[R]ename", _ = "which_key_ignore" }, },
["<leader>s"] = { name = "[S]earch", _ = "which_key_ignore" },
["<leader>w"] = { name = "[W]orkspace", _ = "which_key_ignore" },
})
end,
}, },
-- NOTE: Plugins can specify dependencies. -- NOTE: Plugins can specify dependencies.