---@type LazyPluginSpec return { -- snippets { "L3MON4D3/LuaSnip", -- disable luasnip bindings for and dependencies = { { "honza/vim-snippets", config = function() require("luasnip.loaders.from_snipmate").lazy_load() require("luasnip.loaders.from_lua").load({ paths = vim.fn.stdpath("config") .. "/lua/snippets" }) end, }, }, keys = function() return {} end, opts = { store_selection_keys = "", }, }, -- auto pairs { "echasnovski/mini.pairs", }, -- surround { "echasnovski/mini.surround", keys = function() -- HACK: use function to disable merging with LazyVim's keys definition return { { "ys", desc = "Add surrounding", "n" }, { "S", desc = "Add surrounding", "x" }, { "ds", desc = "Delete surrounding" }, { "cs", desc = "Change surrounding" }, { "yss", "ys_", remap = true }, } end, opts = { mappings = { -- TODO: this is tpope/surround like, but should consider using vim-sandwich mappings -- see: :h MiniSurround-vim-surround-config add = "ys", delete = "ds", find = "", find_left = "", highlight = "", replace = "cs", update_n_lines = "", }, }, config = function(_, opts) require("mini.surround").setup(opts) -- remap visual vim.keymap.del("x", "ys", { silent = true }) vim.keymap.set("x", "S", [[:lua MiniSurround.add('visual')]], { silent = true }) end, }, -- comments { "numToStr/Comment.nvim", opts = { toggler = { line = "gcc", block = "gbb", }, mappings = { basic = true, extra = true, }, }, }, { "JoosepAlviste/nvim-ts-context-commentstring", enabled = false }, { "echasnovski/mini.comment", enabled = false }, }