aboutsummaryrefslogtreecommitdiff
path: root/lua/config
diff options
context:
space:
mode:
authorjdhao <jdhao@hotmail.com>2022-12-14 12:52:40 +0800
committerGitHub <noreply@github.com>2022-12-14 12:52:40 +0800
commit7e7944a30c340319665582cf635aed7678b8a353 (patch)
tree7064f4913e420ad7ac94eb57192c89217d5996b1 /lua/config
parent53c17aea969b108662d3cb614534be10d37e3170 (diff)
use yanky.nvim to replace vim-yoink (#168)
Diffstat (limited to 'lua/config')
-rw-r--r--lua/config/yanky.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/lua/config/yanky.lua b/lua/config/yanky.lua
new file mode 100644
index 0000000..0f8eceb
--- /dev/null
+++ b/lua/config/yanky.lua
@@ -0,0 +1,13 @@
+require("yanky").setup({
+ ring = {
+ history_length = 50,
+ storage = "memory",
+ },
+ preserve_cursor_position = {
+ enabled = false,
+ },
+})
+
+-- cycle through the yank history, only work after paste
+vim.keymap.set("n", "[y", "<Plug>(YankyCycleForward)")
+vim.keymap.set("n", "]y", "<Plug>(YankyCycleBackward)")