From 30ba3c55807c018ef9df40a96cedd2f5005bee41 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 18 Aug 2024 03:00:10 -0700 Subject: [PATCH] feat: add yanky binds --- users/youwen/common/neovim/default.nix | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/users/youwen/common/neovim/default.nix b/users/youwen/common/neovim/default.nix index f800ee6..df6efd5 100644 --- a/users/youwen/common/neovim/default.nix +++ b/users/youwen/common/neovim/default.nix @@ -25,6 +25,10 @@ mapleader = " "; }; + extraConfigLua = '' + require("telescope").load_extension("yank_history") + ''; + keymaps = [ { # Unmap space (leader) @@ -297,6 +301,36 @@ }; mode = "n"; } + { + action = "(YankyPutAfter)"; + key = "p"; + options = {}; + mode = ["n" "x"]; + } + { + action = "(YankyPutBefore)"; + key = "P"; + options = {}; + mode = ["n" "x"]; + } + { + action = "(YankyGPutAfter)"; + key = "gp"; + options = {}; + mode = ["n" "x"]; + } + { + action = "(YankyGPutBefore)"; + key = "gP"; + options = {}; + mode = ["n" "x"]; + } + { + action = ":Telescope yank_history"; + key = "p"; + options = {}; + mode = "n"; + } # { # action = "lua require'conform'.format({ bufnr = args.bf })"; # key = "cf";