local ma = require('harpoon.mark') local ui = require('harpoon.ui') local ts = require('telescope.builtin') local wk = require('which-key') wk.register({ a = { name = 'harpoon', a = { ma.add_file, 'add file', noremap = true, silent = true }, e = { ui.toggle_quick_menu, 'toggle ui', noremap = true, silent = true }, }, b = { ':Buffers', 'buffers', noremap = true, silent = true }, c = { name = '+nerd-commenter' }, d = { ':bd', 'close buffer', noremap = true, silent = true }, e = { ':Telescope find_files', 'find files', noremap = true, silent = true }, G = { ':FloatermNew lazygit', 'lazygit', noremap = true, silent = true }, h = { ':Startify', 'startify', noremap = true, silent = true }, k = { ':w:bp:bd #', 'write and close buffer', noremap = true, silent = false }, u = { vim.cmd.UndotreeToggle, 'undotree', noremap = true, silent = true }, v = { ':FloatermNew vifm', 'vifm', noremap = true, silent = true }, w = { ':w', 'write buffer', noremap = true, silent = false }, x = { ':w:bp:bd #', 'write and close buffer', noremap = true, silent = false }, f = { name = 'telescope', -- f = { ':Telescope find_files', 'find files', noremap = true, silent = true }, f = { ts.find_files, 'find files', noremap = true, silent = true }, g = { ts.git_files, 'git files', noremap = true, silent = true }, s = { function() ts.grep_string({ search = vim.fn.input("Grep > ") }) end, 'grep string', noremap = true, silent = true }, }, g = { name = 'git', s = { vim.cmd.Git, 'git' }, -- a = { ':Ag', 'the_silver_searcher', noremap = true, silent = true }, -- g = { ':Grep', 'grep', noremap = true, silent = true }, -- r = { ':Rg', 'ripgrep', noremap = true, silent = true }, }, v = { name = 'nvim', v = { vim.cmd.Ex, 'explorer', noremap = true, silent = true }, u = { ':PlugUpgrade:PlugUpdate', 'upgrade', noremap = true, silent = true }, }, }, { prefix = '', }) wk.setup({ plugins = { presets = { operators = false, motions = false, text_objects = false, window = false, nav = false, z = false, g = false }, }, triggers = { "" }, triggers_nowait = { "d" }, }) vim.keymap.set('n', '', ts.git_files)