extract some keys to the plugin configs
This commit is contained in:
parent
bce0373dfb
commit
11b954ff33
@ -1,5 +1,5 @@
|
||||
require('aerial').setup({
|
||||
backends = { 'lsp', 'treesitter','markdown' },
|
||||
backends = { 'lsp', 'treesitter', 'markdown' },
|
||||
layout = {
|
||||
default_direction = "prefer_left"
|
||||
},
|
||||
@ -7,4 +7,12 @@ require('aerial').setup({
|
||||
show_guides = true,
|
||||
})
|
||||
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({ paths = { "./my-snippets" } })
|
||||
|
||||
|
||||
require('legendary').commands(
|
||||
{
|
||||
{
|
||||
':LuaSnipListAvailable<CR>',
|
||||
description = 'List snippets',
|
||||
}
|
||||
}
|
||||
)
|
||||
|
@ -28,11 +28,6 @@ require('legendary').setup({
|
||||
':split .<CR>',
|
||||
description = 'Open a new horizontal split',
|
||||
},
|
||||
{
|
||||
'<Space>g',
|
||||
':lua _lazygit_toggle()<CR>',
|
||||
description = 'Open lazygit',
|
||||
},
|
||||
{
|
||||
'<leader>a',
|
||||
'"ayiw',
|
||||
@ -43,36 +38,9 @@ require('legendary').setup({
|
||||
'za',
|
||||
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 =
|
||||
{
|
||||
{
|
||||
':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>',
|
||||
description = 'Big font size',
|
||||
@ -81,30 +49,6 @@ require('legendary').setup({
|
||||
':set guifont=JetBrainsMonoNL\\ NF:h9<CR>',
|
||||
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)
|
||||
local opts = { noremap = true }
|
||||
if (term.cmd ~= 'lazygit') then
|
||||
@ -23,7 +22,7 @@ local lazygit = Terminal:new({
|
||||
hidden = true,
|
||||
direction = 'float',
|
||||
on_open = function(term)
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", {noremap = true, silent = true})
|
||||
vim.api.nvim_buf_set_keymap(term.bufnr, "n", "q", "<cmd>close<CR>", { noremap = true, silent = true })
|
||||
-- vim.api.nvim_buf_set_keymap(term.bufnr, 't', '<esc>', '<esc>', {noremap = true, silent = true})
|
||||
end,
|
||||
})
|
||||
@ -31,3 +30,13 @@ local lazygit = Terminal:new({
|
||||
function _lazygit_toggle()
|
||||
lazygit:toggle()
|
||||
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)", {})
|
||||
|
||||
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