local M = {} function M.setup() local whichkey = require "which-key" local conf = { window = { border = "single", position = "bottom", }, } local opts = { mode = "n", prefix = "", buffer = nil, silent = true, noremap = true, nowait = false, } local keymaps_fzf = { name = "Find", f = { "lua require('utils.finder').find_files()", "Files" }, b = { "Telescope buffers", "Buffers"}, o = { "Telescope oldfiles", "Old Lives"}, g = { "Telescope live_grep", "Live Grep"}, c = { "Telescope commands", "Commands"}, r = { "Telescope file_browser", "File Browser" }, w = { "Telescope current_buffer", "Current Buffer"}, d = { "Telescope diagnostics", "LSP Diagnostics"}, s = { "Telescope lsp_workspace_symbols", "LSP Symbols"}, R = { "Telescope lsp_references", "LSP References"}, } local keymaps_project = { name = "Project", p = { "lua require'telescope'.extensions.project.project{}", "List" }, s = { "Telescope repo list", "Search" }, } local mappings = { ["w"] = { "update!", "Save" }, ["j"] = { "HopWord", "Hop" }, b = { name = "Buffer", q = {"bd", "Close Buffer"}, }, f = keymaps_fzf, p = keymaps_project, } whichkey.setup(conf) whichkey.register(mappings, opts) end return M