local M = {} function M.setup() local whichkey = require "which-key" local conf = { window = { border = "single", -- none, single, double, shadow position = "bottom", -- bottom, top }, } local opts = { mode = "n", -- Normal mode prefix = "", buffer = nil, -- Global mappings. Specify a buffer number for buffer local mappings silent = true, -- use `silent` when creating keymaps noremap = true, -- use `noremap` when creating keymaps nowait = false, -- use `nowait` when creating keymaps } local mappings = { ["w"] = { "update!", "Save" }, ["q"] = { "q!", "Quit" }, ["e"] = { "NvimTreeToggle", "Nvim Tree"}, ["a"] = { "AerialToggle! float","Aerial Toggle"}, o = { name = "+open", }, b = { name = "Buffer", c = { "bd!", "Close current buffer" }, D = { "%bd|e#|bd#", "Delete all buffers" }, }, z = { name = "Packer", c = { "PackerCompile", "Compile" }, i = { "PackerInstall", "Install" }, s = { "PackerSync", "Sync" }, S = { "PackerStatus", "Status" }, u = { "PackerUpdate", "Update" }, }, g = { name = "Git", s = { "Neogit", "Status" }, }, v = { name = "Visual", r = { "RainbowToggle", "Rainbow Brackets Toggle"}, }, } whichkey.setup(conf) whichkey.register(mappings, opts) end return M