local whichkey = require("which-key") -- TODO fix based instructions local keymap = { t = 'Toggle Terminal', l = { name = '+lsp', e = { "lua vim.diagnostic.open_float()", 'Diagnostic Float' }, n = { "lua vim.diagnostic.goto_next()", 'Next Diagnostic' }, N = { "lua vim.diagnostic.goto_prev()", 'Previous Diagnostic' }, j = { "lua vim.diagnostic.setloclist()", 'Diagnostic List' }, --- Dynamic to each buffer potential TODO? D = { "lua vim.lsp.buf.declaration()", 'Declaration' }, d = { "lua vim.lsp.buf.definition()", 'Definition' }, k = { "lua vim.lsp.buf.hover()", 'Hover' }, i = { "lua vim.lsp.buf.implementation()", 'Implementation' }, t = { "lua vim.lsp.buf.type_definition()", 'Type Definition' }, R = { "lua vim.lsp.buf.rename()", 'Rename' }, a = { "lua vim.lsp.buf.code_action()", 'Code Action' }, r = { "lua vim.lsp.buf.references()", 'References' }, f = { function() vim.lsp.buf.format { async = true } end, 'Format' }, }, f = { name = '+find (telescope)', f = { "Telescope find_files", 'Find' }, o = { "Telescope oldfiles", 'Old Files' }, g = { "Telescope live_grep", 'Grep' }, h = { "Telescope help_tags", 'Help Tags' }, }, g = { name = '+git', g = { 'Telescope git_commits', 'Commits' }, b = { 'Telescope git_branches', 'Branches' }, s = { 'Telescope git_status', 'Status' }, } } whichkey.setup { hide_statusline = false, default_keymap_settings = { silent = true, noremap = true, }, default_mode = 'n', } whichkey.register(keymap, { prefix = '' })