local wk = require("which-key") local builtin = require('telescope.builtin') -- the leader key is -- telescope wk.register({ f = { name = "Telescope", f = { builtin.find_files, "Find files" }, g = { builtin.live_grep, "Live grep" }, b = { builtin.buffers, "Find in buffers" }, c = { builtin.current_buffer_fuzzy_find, "Find in current buffer" }, h = { builtin.help_tags, "Find in help tags" }, m = { builtin.marks, "Find in marks" }, r = { builtin.resume, "Resume last find" }, } }, { prefix = "" }) -- clear searchterm vim.keymap.set('n', '', ':noh') -- prevent using arrow keys or mouse vim.keymap.set('n', '', ':echoe "Yo retard use h"') vim.keymap.set('n', '', ':echoe "Yo retard use l"') vim.keymap.set('n', '', ':echoe "Yo retard use k"') vim.keymap.set('n', '', ':echoe "Yo retard use j"') vim.opt.mouse = '' -- dont automatically jump when searching vim.keymap.set('n', '*', '*```') -- show lsp floating tooltip vim.keymap.set('n', '', ':lua vim.lsp.buf.hover()') -- toggle tagbar plugin vim.keymap.set('n', '', ':TagbarToggle fj') -- tab navigation using vim.keymap.set('n', '', ':tabnext') vim.keymap.set('n', '', ':tabprevious') -- quick close tab vim.keymap.set('n', '', ':tabclose') -- jump to definition in new tab vim.keymap.set('n', '', 'tab split | lua vim.lsp.buf.definition()', {}) -- change split window vim.keymap.set('n', '', ':wincmd k') vim.keymap.set('n', '', ':wincmd j') vim.keymap.set('n', '', ':wincmd h') vim.keymap.set('n', '', ':wincmd l') -- move split to tab vim.keymap.set('n', '', ':tab split') -- open context menu vim.keymap.set("n", "", function() require("menu").open("default") end, {}) -- lspsaga wk.register({ l = { name = "Lspsaga", c = { "Lspsaga code_action", "Code Action" }, o = { "Lspsaga outline", "Outline" }, r = { "Lspsaga rename", "Rename" }, d = { "Lspsaga goto_definition", "Lsp GoTo Definition" }, f = { "Lspsaga finder", "Lsp Finder" }, p = { "Lspsaga preview_definition", "Preview Definition" }, s = { "Lspsaga signature_help", "Signature Help" }, w = { "Lspsaga show_workspace_diagnostics", "Show Workspace Diagnostics" }, } }, { prefix = "" })