From e111deabc902e64f09dfd80eec11cb63f99c9086 Mon Sep 17 00:00:00 2001 From: Oliver Hartmann Date: Mon, 5 Dec 2022 14:13:55 +0100 Subject: [PATCH] move to legendary --- lua/my_plugins.lua | 5 ++ lua/setup/my_legendary.lua | 176 +++++++++++++++++++++++++++++++++++++ 2 files changed, 181 insertions(+) create mode 100644 lua/setup/my_legendary.lua diff --git a/lua/my_plugins.lua b/lua/my_plugins.lua index 49971cf..2219726 100644 --- a/lua/my_plugins.lua +++ b/lua/my_plugins.lua @@ -170,6 +170,11 @@ return require('packer').startup(function() 'gfeiyou/command-center.nvim', requires = { 'nvim-telescope/telescope.nvim' }, config = get_setup('my_command_center'), + disable = true + }) + use({ + 'mrjones2014/legendary.nvim', + config = get_setup('my_legendary') }) use({ 'gbprod/yanky.nvim', diff --git a/lua/setup/my_legendary.lua b/lua/setup/my_legendary.lua new file mode 100644 index 0000000..63f01b1 --- /dev/null +++ b/lua/setup/my_legendary.lua @@ -0,0 +1,176 @@ +require('legendary').setup({ + keymaps = { + { + 'p', + ':Legendary keymaps', + description = 'legendary keymaps', + mode = { 'n', 'x', 'i' } + }, + { + 'F2', + 'tabnew .', + description = 'Open a new tab', + }, + { + '', + 'vsplit .', + description = 'Open a new vertical split', + }, + { + '', + 'split .', + description = 'Open a new horizontal split', + }, + { + 'n', + 'Neogen', + description = 'Add comment', + }, + { + 'p', + 'Telescope projects', + description = 'Select project', + }, + { + 'f', + 'lua require("telescope.builtin").find_files({no_ignore=true})', + description = 'Find file', + }, + { + 'g', + 'lua project_files()', + description = 'Find git files', + }, + { + 'o', + 'Telescope oldfiles', + description = 'Find old files', + }, + { + 'h', + 'Telescope command_history', + description = 'Open command history', + }, + { + 'b', + 'Telescope buffers', + description = 'Select buffer', + }, + { + 'q', + 'Telescope quickfix', + description = 'Quickfix list with telescope', + }, + { + 'l', + 'Telescope live_grep', + description = 'Search in project', + }, + { + '', + 'Telescope neoclip', + description = 'Open clipboard history', + }, + { + 'j', + 'Telescope jumplist', + description = 'Open jumplist', + }, + { + '', + 'Telescope current_buffer_fuzzy_find', + description = 'Find in buffer', + }, + { + 'd', + 'Telescope grep_string', + description = 'Find in workspace', + }, + { + 'g', + 'lua _lazygit_toggle()', + description = 'Open lazygit', + }, + { + 'a', + '"ayiw', + description = 'Word under cursor into register a', + }, + { + 'x', + 'za', + description = 'Toggle fold', + }, + { + '', + '(YankyCycleForward)', + description = 'Yanky cycle forward', + }, + { + '', + '(YankyCycleBackward)', + description = 'Yanky cycle backward', + }, + { + '', + { + n = '(comment_toggle_linewise_current)', + v = '(comment_toggle_linewise_visual)gv' + }, + description = 'Toggle comment' + }, + { + 's', + 'AerialToggle', + description = 'Symbols outline', + }, + }, + commands = + { + { + 'Octo pr list', + description = 'Github list PRs', + }, + { + 'Octo pr checkout', + description = 'Github checkout PR', + }, + { + 'Octo pr browser', + description = 'Github open PR in browser', + }, + { + 'set guifont=JetBrainsMonoNL\\ NF:h12', + description = 'Big font size', + }, + { + 'set guifont=JetBrainsMonoNL\\ NF:h9', + description = 'Reset font size', + }, + { + 'CMake build_all', + description = 'CMake build all', + }, + { + 'CMake configure', + description = 'CMake configure', + }, + { + 'CMake select_target', + description = 'CMake select target', + }, + { + 'CMake clear_cache', + description = 'CMake clear cache', + }, + { + 'LuaSnipListAvailable', + description = 'List snippets', + }, + { + "lua require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true })", + description = 'Search in open files', + }, + + } +})