@@ -71,7 +71,25 @@ return {
7171
7272 {
7373 " echasnovski/mini.surround" ,
74- event = " LazyFile" ,
74+ keys = function (_ , keys )
75+ vim .print (keys )
76+ -- Populate the keys based on the user's options
77+ -- https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/plugins/extras/coding/mini-surround.lua
78+ local opts = Util .opts (" mini.surround" )
79+ local mappings = {
80+ { opts .mappings .add , desc = " Add Surrounding" , mode = { " n" , " v" } },
81+ { opts .mappings .delete , desc = " Delete Surrounding" },
82+ { opts .mappings .find , desc = " Find Right Surrounding" },
83+ { opts .mappings .find_left , desc = " Find Left Surrounding" },
84+ { opts .mappings .highlight , desc = " Highlight Surrounding" },
85+ { opts .mappings .replace , desc = " Replace Surrounding" },
86+ { opts .mappings .update_n_lines , desc = " Update `MiniSurround.config.n_lines`" },
87+ }
88+ mappings = vim .tbl_filter (function (m )
89+ return m [1 ] and # m [1 ] > 0
90+ end , mappings )
91+ return vim .list_extend (mappings , keys )
92+ end ,
7593 opts = {
7694 mappings = {
7795 add = " gsa" , -- Add surrounding in Normal and Visual modes
0 commit comments