-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathyank.lua
47 lines (43 loc) · 1.16 KB
/
yank.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
return {
'gbprod/yanky.nvim',
config = function(config)
require('yanky').setup(config.yank)
require('telescope').load_extension('yank_history')
end,
defaultConfig = function()
local mapping = require('yanky.telescope.mapping')
return {
'yank',
{
ring = {
history_length = 100,
storage = 'shada',
sync_with_numbered_registers = true,
cancel_event = 'update',
},
picker = {
select = {
action = nil, -- nil to use default put action
},
telescope = {
mappings = { -- nil to use default mappings
default = mapping.put('p'),
i = { ['<c-x>'] = mapping.delete() },
n = { ['<c-x>'] = mapping.delete() },
},
},
},
system_clipboard = { sync_with_ring = false },
highlight = { on_put = true, on_yank = true, timer = 800 },
preserve_cursor_position = { enabled = true },
},
}
end,
keymaps = {
{ { 'n', 'x' }, 'p', '<Plug>(YankyPutAfter)' },
{ { 'n', 'x' }, 'P', '<Plug>(YankyPutBefore)' },
{ { 'n', 'x' }, 'gp', '<Plug>(YankyGPutAfter)' },
{ { 'n', 'x' }, 'gP', '<Plug>(Y, optsankyGPutBefore)' },
{ 'n', '<space>y', ':Telescope yank_history<cr>' },
},
}