From c333c03a02735ea6b840f84fe30b40ea740e0f2f Mon Sep 17 00:00:00 2001 From: Andre Padez Date: Sat, 11 Oct 2025 07:07:29 +0100 Subject: [PATCH] vim-surround and vim-repeat --- lazy-lock.json | 18 ++++++++++-------- lua/config/keymaps.lua | 34 ++++++++++++++++++++++++++++++++++ lua/plugins/vim-surround.lua | 11 +++++++++++ 3 files changed, 55 insertions(+), 8 deletions(-) create mode 100644 lua/plugins/vim-surround.lua diff --git a/lazy-lock.json b/lazy-lock.json index b95cc94..b3f91c0 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,15 +1,15 @@ { - "LazyVim": { "branch": "main", "commit": "2c44d3306398fc7ca1cc02c2e9466944a2725030" }, - "blink-cmp-copilot": { "branch": "main", "commit": "439cff78780c033aa23cf061d7315314b347e3c1" }, + "LazyVim": { "branch": "main", "commit": "dc1ffa5bcb66f46284f91a8593dda5c7c54a1824" }, + "blink-copilot": { "branch": "main", "commit": "5d35fd07fcc148be20442da1bdd2407e03263d7d" }, "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, "catppuccin": { "branch": "main", "commit": "af58927c55c9f3272c940ff02b3cee94a1249f26" }, "conform.nvim": { "branch": "master", "commit": "fbcb4fa7f34bfea9be702ffff481a8e336ebf6ed" }, - "copilot.lua": { "branch": "master", "commit": "30b98a4c25d6152c14084020f703b6d56e1f1122" }, + "copilot.lua": { "branch": "master", "commit": "92e08cd472653beaece28ad9c8508a851a613358" }, "flash.nvim": { "branch": "main", "commit": "2febce67ff9cf7638d2569d17c41af02c38401eb" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "gitsigns.nvim": { "branch": "main", "commit": "1ee5c1fd068c81f9dd06483e639c2aa4587dc197" }, - "grug-far.nvim": { "branch": "main", "commit": "48f9afb684de1c191af7bed96bc1db85ba33f6a4" }, + "grug-far.nvim": { "branch": "main", "commit": "2e991081c0e653e151fc9e659514d7c2fc31d22a" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "e28ce52fc7ff79fcb76f0e79ee6fb6182fca90b9" }, "lualine.nvim": { "branch": "master", "commit": "b8c23159c0161f4b89196f74ee3a6d02cdc3a955" }, @@ -21,16 +21,18 @@ "noice.nvim": { "branch": "main", "commit": "38c702be0d8fea81527ee6a73e1e834e72481193" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-lint": { "branch": "master", "commit": "9da1fb942dd0668d5182f9c8dee801b9c190e2bb" }, - "nvim-lspconfig": { "branch": "master", "commit": "e688b486fe9291f151eae7e5c0b5a5c4ef980847" }, - "nvim-treesitter": { "branch": "main", "commit": "3ab4f2d2d20be55874e2eb575145c6928d7d7d0e" }, + "nvim-lspconfig": { "branch": "master", "commit": "3a274c38e53800cf1d72b79baeb6c73e03ef1db3" }, + "nvim-treesitter": { "branch": "main", "commit": "de003000a287c501a6650a1ddd3be80ee34278d4" }, "nvim-treesitter-textobjects": { "branch": "main", "commit": "1b2d85d3de6114c4bcea89ffb2cd1ce9e3a19931" }, "nvim-ts-autotag": { "branch": "main", "commit": "c4ca798ab95b316a768d51eaaaee48f64a4a46bc" }, "persistence.nvim": { "branch": "main", "commit": "51eef57272742b773468949f6bd0503ec3f83874" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "snacks.nvim": { "branch": "main", "commit": "dae80fb393f712bd7352a20f9185f5e16b69f20f" }, + "snacks.nvim": { "branch": "main", "commit": "d91fc7d3fa853422fe4d506220b23394d2c19d38" }, "todo-comments.nvim": { "branch": "main", "commit": "19d461ddd543e938eb22505fb03fa878800270b6" }, - "tokyonight.nvim": { "branch": "main", "commit": "00d92e6009671493fceeb0e4baf644f5b983e6e4" }, + "tokyonight.nvim": { "branch": "main", "commit": "d14614cbfc63b6037bfccd48bb982d2ad2003352" }, "trouble.nvim": { "branch": "main", "commit": "c098362fe603d3922095e7db595961e020bdf2d0" }, "ts-comments.nvim": { "branch": "main", "commit": "217ab9cc137fceb6659b53790bd25e608219abe1" }, + "vim-repeat": { "branch": "master", "commit": "65846025c15494983dafe5e3b46c8f88ab2e9635" }, + "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "which-key.nvim": { "branch": "main", "commit": "b4177e3eaf15fe5eb8357ebac2286d488be1ed00" } } diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index b83d0e1..6ea6da1 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -1,3 +1,37 @@ -- 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 addtional keymaps here +-- +-- vim.keymap.set("n", "", function() +-- Snacks.explorer.open() +-- vim.schedule(function() +-- vim.api.nvim_feedkeys("/", "m", false) +-- end) +-- end, { desc = "Focus Explorer search" }) +-- + +-- local map = vim.keymap.set +-- local function has_cmd(cmd) +-- return vim.fn.exists(":" .. cmd) == 2 +-- end +-- +-- -- Ctrl+P → open your file explorer (auto-detect) +-- if has_cmd("Neotree") then +-- map("n", "", "Neotree toggle reveal", { desc = "Explorer (Neo-tree)" }) +-- elseif has_cmd("NvimTreeToggle") then +-- map("n", "", "NvimTreeFindFileToggle", { desc = "Explorer (nvim-tree)" }) +-- elseif has_cmd("Oil") then +-- map("n", "", "Oil --float", { desc = "Explorer (Oil)" }) +-- else +-- map("n", "", "Ex", { desc = "Explorer (netrw)" }) -- built-in +-- end +-- +-- -- Ctrl+Shift+P → “command palette” +-- -- Many terminals don't send , so keep P as a reliable fallback. +-- if has_cmd("WhichKey") then +-- map("n", "", "WhichKey", { desc = "Command Palette" }) +-- map("n", "P", "WhichKey", { desc = "Command Palette [fallback]" }) +-- elseif has_cmd("Telescope") then +-- map("n", "", "Telescope commands", { desc = "Command Palette" }) +-- map("n", "P", "Telescope commands", { desc = "Command Palette [fallback]" }) +-- end diff --git a/lua/plugins/vim-surround.lua b/lua/plugins/vim-surround.lua new file mode 100644 index 0000000..b65d940 --- /dev/null +++ b/lua/plugins/vim-surround.lua @@ -0,0 +1,11 @@ +return { + { + "tpope/vim-repeat", + event = "VeryLazy", + }, + { + "tpope/vim-surround", + event = "VeryLazy", + dependencies = { "tpope/vim-repeat" }, + }, +}