move to legendary
This commit is contained in:
parent
c5073fe73e
commit
e111deabc9
@ -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',
|
||||
|
176
lua/setup/my_legendary.lua
Normal file
176
lua/setup/my_legendary.lua
Normal file
@ -0,0 +1,176 @@
|
||||
require('legendary').setup({
|
||||
keymaps = {
|
||||
{
|
||||
'<Leader>p',
|
||||
':Legendary keymaps<CR>',
|
||||
description = 'legendary keymaps',
|
||||
mode = { 'n', 'x', 'i' }
|
||||
},
|
||||
{
|
||||
'F2',
|
||||
'<CMD>tabnew .<CR>',
|
||||
description = 'Open a new tab',
|
||||
},
|
||||
{
|
||||
'<C-F2>',
|
||||
'<CMD>vsplit .<CR>',
|
||||
description = 'Open a new vertical split',
|
||||
},
|
||||
{
|
||||
'<S-F2>',
|
||||
'<CMD>split .<CR>',
|
||||
description = 'Open a new horizontal split',
|
||||
},
|
||||
{
|
||||
'<leader>n',
|
||||
'<CMD>Neogen<CR>',
|
||||
description = 'Add comment',
|
||||
},
|
||||
{
|
||||
'<space>p',
|
||||
'<CMD>Telescope projects<CR>',
|
||||
description = 'Select project',
|
||||
},
|
||||
{
|
||||
'<leader>f',
|
||||
'<CMD>lua require("telescope.builtin").find_files({no_ignore=true})<CR>',
|
||||
description = 'Find file',
|
||||
},
|
||||
{
|
||||
'<leader>g',
|
||||
'<CMD>lua project_files()<CR>',
|
||||
description = 'Find git files',
|
||||
},
|
||||
{
|
||||
'<leader>o',
|
||||
'<CMD>Telescope oldfiles<CR>',
|
||||
description = 'Find old files',
|
||||
},
|
||||
{
|
||||
'<leader>h',
|
||||
'<CMD>Telescope command_history<CR>',
|
||||
description = 'Open command history',
|
||||
},
|
||||
{
|
||||
'<leader>b',
|
||||
'<CMD>Telescope buffers<CR>',
|
||||
description = 'Select buffer',
|
||||
},
|
||||
{
|
||||
'<leader>q',
|
||||
'<CMD>Telescope quickfix<CR>',
|
||||
description = 'Quickfix list with telescope',
|
||||
},
|
||||
{
|
||||
'<leader>l',
|
||||
'<CMD>Telescope live_grep<CR>',
|
||||
description = 'Search in project',
|
||||
},
|
||||
{
|
||||
'<C-y>',
|
||||
'<CMD>Telescope neoclip<CR>',
|
||||
description = 'Open clipboard history',
|
||||
},
|
||||
{
|
||||
'<leader>j',
|
||||
'<CMD>Telescope jumplist<CR>',
|
||||
description = 'Open jumplist',
|
||||
},
|
||||
{
|
||||
'<c-f>',
|
||||
'<CMD>Telescope current_buffer_fuzzy_find<CR>',
|
||||
description = 'Find in buffer',
|
||||
},
|
||||
{
|
||||
'<leader>d',
|
||||
'<CMD>Telescope grep_string<CR>',
|
||||
description = 'Find in workspace',
|
||||
},
|
||||
{
|
||||
'<Space>g',
|
||||
'<CMD>lua _lazygit_toggle()<CR>',
|
||||
description = 'Open lazygit',
|
||||
},
|
||||
{
|
||||
'<leader>a',
|
||||
'"ayiw',
|
||||
description = 'Word under cursor into register a',
|
||||
},
|
||||
{
|
||||
'<space>x',
|
||||
'za',
|
||||
description = 'Toggle fold',
|
||||
},
|
||||
{
|
||||
'<c-n>',
|
||||
'<Plug>(YankyCycleForward)',
|
||||
description = 'Yanky cycle forward',
|
||||
},
|
||||
{
|
||||
'<c-p>',
|
||||
'<Plug>(YankyCycleBackward)',
|
||||
description = 'Yanky cycle backward',
|
||||
},
|
||||
{
|
||||
'<c-c>',
|
||||
{
|
||||
n = '<Plug>(comment_toggle_linewise_current)',
|
||||
v = '<Plug>(comment_toggle_linewise_visual)gv'
|
||||
},
|
||||
description = 'Toggle comment'
|
||||
},
|
||||
{
|
||||
'<leader>s',
|
||||
'<CMD>AerialToggle<CR>',
|
||||
description = 'Symbols outline',
|
||||
},
|
||||
},
|
||||
commands =
|
||||
{
|
||||
{
|
||||
'<CMD>Octo pr list<CR>',
|
||||
description = 'Github list PRs',
|
||||
},
|
||||
{
|
||||
'<CMD>Octo pr checkout<CR>',
|
||||
description = 'Github checkout PR',
|
||||
},
|
||||
{
|
||||
'<CMD>Octo pr browser<CR>',
|
||||
description = 'Github open PR in browser',
|
||||
},
|
||||
{
|
||||
'<CMD>set guifont=JetBrainsMonoNL\\ NF:h12<CR>',
|
||||
description = 'Big font size',
|
||||
},
|
||||
{
|
||||
'<CMD>set guifont=JetBrainsMonoNL\\ NF:h9<CR>',
|
||||
description = 'Reset font size',
|
||||
},
|
||||
{
|
||||
'<CMD>CMake build_all<CR>',
|
||||
description = 'CMake build all',
|
||||
},
|
||||
{
|
||||
'<CMD>CMake configure<CR>',
|
||||
description = 'CMake configure',
|
||||
},
|
||||
{
|
||||
'<CMD>CMake select_target<CR>',
|
||||
description = 'CMake select target',
|
||||
},
|
||||
{
|
||||
'<CMD>CMake clear_cache<CR>',
|
||||
description = 'CMake clear cache',
|
||||
},
|
||||
{
|
||||
'<CMD>LuaSnipListAvailable<CR>',
|
||||
description = 'List snippets',
|
||||
},
|
||||
{
|
||||
"<CMD>lua require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true })<CR>",
|
||||
description = 'Search in open files',
|
||||
},
|
||||
|
||||
}
|
||||
})
|
Loading…
x
Reference in New Issue
Block a user