extract some keys to the plugin configs
This commit is contained in:
parent
bce0373dfb
commit
11b954ff33
@ -7,4 +7,12 @@ require('aerial').setup({
|
|||||||
show_guides = true,
|
show_guides = true,
|
||||||
})
|
})
|
||||||
require('telescope').load_extension('aerial')
|
require('telescope').load_extension('aerial')
|
||||||
vim.keymap.set('n', '<leader>s', '<cmd>AerialToggle<cr>', opts)
|
require('legendary').keymaps(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
'<leader>s',
|
||||||
|
':AerialToggle<CR>',
|
||||||
|
description = 'Symbols outline',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@ -55,3 +55,13 @@ ls.snippets = {
|
|||||||
|
|
||||||
require('luasnip.loaders.from_vscode').lazy_load()
|
require('luasnip.loaders.from_vscode').lazy_load()
|
||||||
require('luasnip.loaders.from_vscode').lazy_load({ paths = { "./my-snippets" } })
|
require('luasnip.loaders.from_vscode').lazy_load({ paths = { "./my-snippets" } })
|
||||||
|
|
||||||
|
|
||||||
|
require('legendary').commands(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
':LuaSnipListAvailable<CR>',
|
||||||
|
description = 'List snippets',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@ -28,11 +28,6 @@ require('legendary').setup({
|
|||||||
':split .<CR>',
|
':split .<CR>',
|
||||||
description = 'Open a new horizontal split',
|
description = 'Open a new horizontal split',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'<Space>g',
|
|
||||||
':lua _lazygit_toggle()<CR>',
|
|
||||||
description = 'Open lazygit',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
'<leader>a',
|
'<leader>a',
|
||||||
'"ayiw',
|
'"ayiw',
|
||||||
@ -43,36 +38,9 @@ require('legendary').setup({
|
|||||||
'za',
|
'za',
|
||||||
description = 'Toggle fold',
|
description = 'Toggle fold',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
'<c-n>',
|
|
||||||
'<Plug>(YankyCycleForward)',
|
|
||||||
description = 'Yanky cycle forward',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<c-p>',
|
|
||||||
'<Plug>(YankyCycleBackward)',
|
|
||||||
description = 'Yanky cycle backward',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
'<leader>s',
|
|
||||||
':AerialToggle<CR>',
|
|
||||||
description = 'Symbols outline',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
commands =
|
commands =
|
||||||
{
|
{
|
||||||
{
|
|
||||||
':Octo pr list<CR>',
|
|
||||||
description = 'Github list PRs',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
':Octo pr checkout<CR>',
|
|
||||||
description = 'Github checkout PR',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
':Octo pr browser<CR>',
|
|
||||||
description = 'Github open PR in browser',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
':set guifont=JetBrainsMonoNL\\ NF:h12<CR>',
|
':set guifont=JetBrainsMonoNL\\ NF:h12<CR>',
|
||||||
description = 'Big font size',
|
description = 'Big font size',
|
||||||
@ -81,30 +49,6 @@ require('legendary').setup({
|
|||||||
':set guifont=JetBrainsMonoNL\\ NF:h9<CR>',
|
':set guifont=JetBrainsMonoNL\\ NF:h9<CR>',
|
||||||
description = 'Reset font size',
|
description = 'Reset font size',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
':CMake build_all<CR>',
|
|
||||||
description = 'CMake build all',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
':CMake configure<CR>',
|
|
||||||
description = 'CMake configure',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
':CMake select_target<CR>',
|
|
||||||
description = 'CMake select target',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
':CMake clear_cache<CR>',
|
|
||||||
description = 'CMake clear cache',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
':LuaSnipListAvailable<CR>',
|
|
||||||
description = 'List snippets',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
":lua require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true })<CR>",
|
|
||||||
description = 'Search in open files',
|
|
||||||
},
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
@ -124,3 +124,12 @@ require('legendary').keymaps(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
require('legendary').func(
|
||||||
|
{
|
||||||
|
function()
|
||||||
|
require('telescope.builtin').live_grep({ prompt_title = 'find string in open buffers...', grep_open_files = true })
|
||||||
|
end,
|
||||||
|
description = 'Search in open files',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
function _G.set_terminal_keymaps(term)
|
function _G.set_terminal_keymaps(term)
|
||||||
local opts = { noremap = true }
|
local opts = { noremap = true }
|
||||||
if (term.cmd ~= 'lazygit') then
|
if (term.cmd ~= 'lazygit') then
|
||||||
@ -31,3 +30,13 @@ local lazygit = Terminal:new({
|
|||||||
function _lazygit_toggle()
|
function _lazygit_toggle()
|
||||||
lazygit:toggle()
|
lazygit:toggle()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
require('legendary').keymaps(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
'<Space>g',
|
||||||
|
':lua _lazygit_toggle()<CR>',
|
||||||
|
description = 'Open lazygit',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
@ -11,3 +11,17 @@ vim.keymap.set("n", "<c-n>", "<Plug>(YankyCycleForward)", {})
|
|||||||
vim.keymap.set("n", "<c-p>", "<Plug>(YankyCycleBackward)", {})
|
vim.keymap.set("n", "<c-p>", "<Plug>(YankyCycleBackward)", {})
|
||||||
|
|
||||||
require("telescope").load_extension('yank_history')
|
require("telescope").load_extension('yank_history')
|
||||||
|
require('legendary').keymaps(
|
||||||
|
{
|
||||||
|
{
|
||||||
|
'<c-n>',
|
||||||
|
'<Plug>(YankyCycleForward)',
|
||||||
|
description = 'Yanky cycle forward',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'<c-p>',
|
||||||
|
'<Plug>(YankyCycleBackward)',
|
||||||
|
description = 'Yanky cycle backward',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user