From 323f1a7057e88ec8881ec10d6d101fc4e2aae1de Mon Sep 17 00:00:00 2001 From: Omar Mendoza <1206997+omaryahir@users.noreply.github.com> Date: Thu, 10 Oct 2024 00:20:33 -0600 Subject: [PATCH] feat: moving s standard behavior and fix for relative number [custom-2024-10-10] --- lua/config/keymaps.lua | 2 ++ lua/plugins/flash.lua | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 lua/plugins/flash.lua diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 2c134f7..a7c84c9 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -1,3 +1,5 @@ -- Keymaps are automatically loaded on the VeryLazy event -- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua -- Add any additional keymaps here + +vim.opt.relativenumber = false diff --git a/lua/plugins/flash.lua b/lua/plugins/flash.lua new file mode 100644 index 0000000..80c4977 --- /dev/null +++ b/lua/plugins/flash.lua @@ -0,0 +1,19 @@ +return { + { + "folke/flash.nvim", + event = "VeryLazy", + vscode = true, + ---@type Flash.Config + opts = {}, + -- stylua: ignore + keys = { + { "s", mode = { "n", "x", "o" }, false }, + { "S", mode = { "n", "x", "o" }, false }, + { "ss", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash" }, + { "SS", mode = { "n", "o", "x" }, function() require("flash").treesitter() end, desc = "Flash Treesitter" }, + { "r", mode = "o", function() require("flash").remote() end, desc = "Remote Flash" }, + { "R", mode = { "o", "x" }, function() require("flash").treesitter_search() end, desc = "Treesitter Search" }, + { "", mode = { "c" }, function() require("flash").toggle() end, desc = "Toggle Flash Search" }, + }, + }, +}