From 9f984e8c470cead380f404c3876100b61706dcef Mon Sep 17 00:00:00 2001 From: tiyn Date: Wed, 27 Mar 2024 00:58:54 +0100 Subject: [PATCH] nvim: added leap for improved movement --- .config/nvim/lazy-lock.json | 1 + .config/nvim/lua/plugins/vim-sneak.lua | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 .config/nvim/lua/plugins/vim-sneak.lua diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json index 2ca69f3..97d6279 100644 --- a/.config/nvim/lazy-lock.json +++ b/.config/nvim/lazy-lock.json @@ -17,6 +17,7 @@ "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" }, "knap": { "branch": "main", "commit": "d4ea571d2d4e139d288b758c5bab31788d30eea3" }, "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" }, + "leap.nvim": { "branch": "main", "commit": "25753d8a16b69fbbce5d392702c21dbc79d86bd1" }, "lsp_signature.nvim": { "branch": "master", "commit": "e92b4e7073345b2a30a56b20db3d541a9aa2771e" }, "lspkind-nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lualine.nvim": { "branch": "master", "commit": "8b56462bfb746760465264de41b4907310f113ec" }, diff --git a/.config/nvim/lua/plugins/vim-sneak.lua b/.config/nvim/lua/plugins/vim-sneak.lua new file mode 100644 index 0000000..731daa1 --- /dev/null +++ b/.config/nvim/lua/plugins/vim-sneak.lua @@ -0,0 +1,16 @@ +return { + -- improved movement + { + "ggandor/leap.nvim", + config = function() + require("leap").create_default_mappings() + require("leap").opts.highlight_unlabeled_phase_one_targets = true + require("leap").opts.equivalence_classes = { " \t\r\n", "([{", ")]}", "'\"`" } + require("leap").opts.special_keys.prev_target = "" + require("leap").opts.special_keys.prev_group = "" + require("leap.user").set_repeat_keys("", "") + require("leap").opts.safe_labels = "sfnut/SFNLHMUGTZ?" + require("leap").opts.labels = "sfnjklhodweimbuyvrgtaqpcxz/SFNJKLHODWEIMBUYVRGTAQPCXZ?" + end, + }, +}