added yanky

This commit is contained in:
Oliver Hartmann 2024-06-26 23:15:42 +02:00
parent 39c648bbbe
commit cb8be9c3d2
2 changed files with 23 additions and 0 deletions

View File

@ -18,6 +18,7 @@ return {
{ 'dmitmel/cmp-cmdline-history' },
{ 'ray-x/cmp-treesitter' },
{ 'hrsh7th/cmp-nvim-lsp-signature-help' },
{ 'chrisgrieser/cmp_yanky' },
{ 'p00f/clangd_extensions.nvim' },
{
'windwp/nvim-autopairs',
@ -102,6 +103,15 @@ return {
},
{ name = 'nvim_lsp_signature_help', priority = 7 },
-- { name = 'treesitter', priority = 6 },
{
name = 'cmp_yanky',
option = {
-- only suggest items which match the current filetype
onlyCurrentFiletype = false,
-- only suggest items with a minimum length
minLength = 3,
},
},
{
name = 'buffer',
priority = 3,

13
lua/plugins/yanky.lua Normal file
View File

@ -0,0 +1,13 @@
return {
'gbprod/yanky.nvim',
config = function()
require('yanky').setup({})
vim.keymap.set({ 'n', 'x' }, 'p', '<Plug>(YankyPutAfter)')
vim.keymap.set({ 'n', 'x' }, 'P', '<Plug>(YankyPutBefore)')
vim.keymap.set({ 'n', 'x' }, 'gp', '<Plug>(YankyGPutAfter)')
vim.keymap.set({ 'n', 'x' }, 'gP', '<Plug>(YankyGPutBefore)')
vim.keymap.set('n', '<c-p>', '<Plug>(YankyPreviousEntry)')
vim.keymap.set('n', '<c-n>', '<Plug>(YankyNextEntry)')
end,
}