local wk = require("which-key") wk.setup { ignore_missing = true, key_labels = { [""] = "SPC" } } wk.register({ [""] = { f = { name = "Find", f = { "Telescope fd", "find file" }, w = { "Telescope live_grep", "live grep" }, s = { "Telescope spell_suggest", "spell suggest" }, b = { "Telescope buffers", "all buffers" }, t = { "TodoTelescope", "todos" }, ["."] = { "Telescope keymaps", "keymaps" } }, l = { name = "LSP", r = { "lua require('cosmic-ui').rename()", "rename" }, d = { "Telescope diagnostics", "diagnostics" }, f = { "lua vim.lsp.buf.format { async = true }", "format" }, a = { "CodeActionMenu", "code action" } }, b = { name = "Buffer", p = { "BufferPick", "pick buffer" }, q = { "BufferMovePrevious", "move buffer left" }, w = { "BufferMoveNext", "move buffer right" }, x = { "BufferCloseAllButCurrent", "close all but current" } }, g = { name = "Git", b = { "Gitsigns blame_line", "blame line" }, d = { "Gitsigns diffthis", "diff" }, s = { "Telescope git_status", "git status" }, c = { "Telescope git_commits", "commits" } }, x = { "BufferClose", "close buffer" }, r = { "NvimTreeRefresh", "refresh tree" }, c = { "Telescope colorscheme", "colorscheme" }, s = { "SymbolsOutline", "symbols outline" }, h = { "noh", "no highlight" }, t = { name = "Terminal", t = { "ToggleTerm direction=horizontal", "open terminal" } } }, t = { name = "Trouble", t = { "TroubleToggle", "toggle trouble" } }, g = { d = { "lua vim.lsp.buf.definition()", "definition" }, D = { "lua vim.lsp.buf.declaration()", "declaration" }, i = { "lua vim.lsp.buf.implementation()", "implementation" }, t = { "lua vim.lsp.buf.type_definition()", "type definition" } }, K = { "lua vim.lsp.buf.hover()", "hover" }, [""] = { "lua vim.lsp.buf.signature_help()", "signature help" }, -- Nvim Tree [""] = { "NvimTreeToggle .", "toggle nvimtree" }, -- Switching Buffers [""] = { "BufferNext", "next buffer" }, [""] = { "BufferPrevious", "previous buffer" }, -- Find in file [""] = { "Telescope current_buffer_fuzzy_find", "find in file" } })