local wk = require("which-key") wk.setup({ key_labels = { [""] = "␣", [""] = "␣", [""] = " ", [""] = " ", [""] = "⎋ ", }, window = { border = "double", margin = { 0, 0, 0, 0 }, }, }) -- Telescope wk.register({ ["f"] = { name = "+Telescope", b = { "Telescope file_browser", "File Browser" }, c = { "Easypick chezmoi", "Chezmoi" }, d = { "Telescope find_files", "Find File" }, g = { "Telescope live_grep", "Live Grep" }, h = { "Telescope help_tags", "Help Tags" }, p = { "Telescope project", "Project" }, r = { "Telescope asynctasks all", "Run Asynctasks" }, s = { function() local confpath = vim.fn.resolve(vim.fn.stdpath("config")) require("telescope.builtin").find_files({ cwd = confpath }) end, "Find in config", }, }, }) -- clipboard wk.register({ [""] = { y = { '"+y', "Copy to clipboard" }, p = { '"+p', "Paste from clipboard" }, db = { "DBUIToggle", "Toggle DBUI" }, gd = { "Gvdiff!", "Git Diff" }, ng = { "Neogit", "Neogit" }, sl = { "SessionLoad", "Load Session" }, }, }, { mode = { "n", "v" } }) wk.register({ -- easier split navigation [""] = { "j" }, [""] = { "k" }, [""] = { "l" }, [""] = { "h" }, ["\\"] = { "vsplit" }, ["-"] = { "split" }, ["x"] = { "q" }, -- diffs ["gd"] = { "Gvdiff!", "Diff vsplit" }, ["gd"] = { "diffget", "Get from diff" }, ["gdh"] = { "diffget //2", "Get diff from the left" }, ["gdl"] = { "diffget //3", "Get diff from the right" }, })