From 11b70a5344f984d45ac95d8e21cbc63b4c100c82 Mon Sep 17 00:00:00 2001 From: Ruslan Rakhmanov Date: Wed, 9 Apr 2025 18:01:56 +0200 Subject: [PATCH] Leap, autopairs --- init.lua | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 1e97ae7a..17a142cb 100644 --- a/init.lua +++ b/init.lua @@ -1045,6 +1045,25 @@ require('lazy').setup({ -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, + { + 'ggandor/leap.nvim', + enabled = true, + keys = { + { 's', mode = { 'n', 'x', 'o' }, desc = 'Leap Forward to' }, + { 'S', mode = { 'n', 'x', 'o' }, desc = 'Leap Backward to' }, + { 'gs', mode = { 'n', 'x', 'o' }, desc = 'Leap from Windows' }, + }, + config = function(_, opts) + local leap = require 'leap' + for k, v in pairs(opts) do + leap.opts[k] = v + end + leap.add_default_mappings(true) + vim.keymap.del({ 'x', 'o' }, 'x') + vim.keymap.del({ 'x', 'o' }, 'X') + end, + }, + -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and -- place them in the correct locations. @@ -1057,7 +1076,7 @@ require('lazy').setup({ -- require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.autopairs', require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps