return { "folke/which-key.nvim", event = "VeryLazy", init = function() vim.o.timeout = true vim.o.timeoutlen = 300 end, opts = { f = { name = "File" }, t = { name = "Tab", c = { "tabnew", "Create" }, ["1"] = { "1gt", "1" }, ["2"] = { "2gt", "2" }, ["3"] = { "3gt", "3" }, ["4"] = { "4gt", "4" }, ["5"] = { "5gt", "5" }, ["6"] = { "6gt", "6" }, ["7"] = { "7gt", "7" }, ["8"] = { "8gt", "8" }, ["9"] = { "9gt", "9" }, }, b = { name = "Buffer", n = { "BufferNext", "Next" }, p = { "BufferPrevious", "Previous" }, c = { "BufferClose", "Close" }, }, l = { name = "LSP", a = { "lua vim.lsp.buf.code_action()", "Action" }, f = { "lua vim.lsp.buf.format({ async = false, timeout_ms = 5000 })", "Format", }, d = { "lua vim.diagnostic.open_float()", "Diagnostic" }, h = { "lua vim.lsp.buf.hover()", "Help" }, g = { name = "Go to", D = { "lua vim.lsp.buf.declaration()", "Go to declaration", }, d = { "lua vim.lsp.buf.definition()", "Go to definition" }, i = { "lua vim.lsp.buf.definition()", "Go to implementation", }, }, }, }, config = function(_, opts) local wk = require("which-key") wk.register(opts, { prefix = "" }) end, }