return { -- Mini Nvim {"echasnovski/mini.nvim", version = false }, { 'echasnovski/mini.comment', version = false, dependencies = { "JoosepAlviste/nvim-ts-context-commentstring", }, config = function() --disable the autocommand from ts-context-commentstring require('ts_context_commentstring').setup { enable_autocmd = false, } require("mini.comment").setup { --tsx, jsx, html, svelte comment support options = { custom_commentstring = function() return require('ts_context_commentstring.internal').calculate_commentstring({ key = 'commentstring' }) or vim.bo.commentstring end, }, } end, }, -- File Explorer (works wil Oil File Explorer) { 'echasnovski/mini.files', config = function() local MiniFiles = require("mini.files") MiniFiles.setup({ mappings = { go_in = "", -- Map both Enter and L to enter directories or open files go_in_plus = "L", --Open go_out = "-", --Previous folder go_out_plus = "H", --Close folder }, }) vim.keymap.set("n", "ee", "lua MiniFiles.open()", { desc = "Toggle mini file explorer" }) -- toggle file explorer vim.keymap.set("n", "ef", function() MiniFiles.open(vim.api.nvim_buf_get_name(0), false) MiniFiles.reveal_cwd() end, { desc = "Toggle into currently opened file" }) end }, { 'echasnovski/mini.surround', event = { "BufReadPre", "BufNewFile" }, opts = { custom_surroundings = nil, highlight_duration = 300, -- INFO: --saiw surround with no whitespace --saw surround with whitespace mappings = { add = 'sa', delete = 'ds', find = 'sf', find_left = 'sF', highlight = 'sh', replace = 'sr', update_n_lines = 'sn', suffix_last = 'l', -- Suffix to search with "previous" method suffix_next = 'n', -- Suffix to search with "next" method }, n_lines = 20, respect_selection_type = false, search_method = 'cover', silent = false, }, -- Get rid of whitespace { "echasnovski/mini.trailspace", event = { "BufReadPost", "BufNewFile" }, config = function() local miniTrailspace = require("mini.trailspace") miniTrailspace.setup({ only_in_normal_buffers = true, }) vim.keymap.set("n", "cw", function() miniTrailspace.trim() end, { desc = "Erase Whitespace" }) vim.api.nvim_create_autocmd("CursorMoved", { pattern = "*", callback = function() require("mini.trailspace").unhighlight() end, }) end }, { "echasnovski/mini.splitjoin", config = function() local miniSplitJoin = require("mini.splitjoin") miniSplitJoin.setup({ mappings = { toggle = ""}, }) vim.keymap.set({ "n", "x", }, "sj", function() miniSplitJoin.join() end, { desc = "Join arguments" }) vim.keymap.set({ "n", "x", }, "sk", function() miniSplitJoin.split() end, { desc = "Split arguments"}) end, } } }