83 lines
2.3 KiB
Lua
83 lines
2.3 KiB
Lua
return {
|
|
{
|
|
"nvim-mini/mini.ai",
|
|
event = "VeryLazy",
|
|
dependencies = { "nvim-treesitter/nvim-treesitter-textobjects" },
|
|
config = function()
|
|
local ai = require("mini.ai")
|
|
ai.setup({
|
|
n_lines = 500,
|
|
custom_textobjects = {
|
|
f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }),
|
|
c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }),
|
|
},
|
|
-- No bracket motions (QWERTZ).
|
|
mappings = { goto_left = "", goto_right = "" },
|
|
})
|
|
end,
|
|
},
|
|
{
|
|
"nvim-mini/mini.surround",
|
|
event = "VeryLazy",
|
|
-- gz prefix so the built-in `s` stays untouched.
|
|
opts = {
|
|
mappings = {
|
|
add = "gza",
|
|
delete = "gzd",
|
|
find = "gzf",
|
|
find_left = "gzF",
|
|
highlight = "gzh",
|
|
replace = "gzr",
|
|
update_n_lines = "gzn",
|
|
},
|
|
},
|
|
},
|
|
{
|
|
"folke/flash.nvim",
|
|
keys = {
|
|
{ "s", mode = { "n", "x", "o" }, function() require("flash").jump() end, desc = "Flash jump" },
|
|
},
|
|
opts = {},
|
|
},
|
|
{
|
|
"Wansmer/treesj",
|
|
dependencies = { "nvim-treesitter/nvim-treesitter" },
|
|
keys = {
|
|
{ "<leader>j", function() require("treesj").toggle() end, desc = "Toggle block split/join" },
|
|
},
|
|
opts = { use_default_keymaps = false, max_join_length = 150 },
|
|
},
|
|
{
|
|
"nvim-treesitter/nvim-treesitter-context",
|
|
event = { "BufReadPost", "BufNewFile" },
|
|
opts = { max_lines = 2, multiline_threshold = 1, mode = "cursor", separator = "-" },
|
|
},
|
|
{
|
|
"nvim-mini/mini.hipatterns",
|
|
event = "VeryLazy",
|
|
config = function()
|
|
local hi = require("mini.hipatterns")
|
|
hi.setup({ highlighters = { hex_color = hi.gen_highlighter.hex_color() } })
|
|
end,
|
|
},
|
|
{
|
|
"nvim-mini/mini.indentscope",
|
|
event = "VeryLazy",
|
|
opts = { symbol = "|", options = { try_as_border = true } },
|
|
init = function()
|
|
vim.api.nvim_create_autocmd("FileType", {
|
|
group = vim.api.nvim_create_augroup("plugins.indentscope", { clear = true }),
|
|
pattern = { "help", "lazy", "snacks_picker_input", "snacks_picker_list", "oil" },
|
|
callback = function(ev)
|
|
vim.b[ev.buf].miniindentscope_disable = true
|
|
end,
|
|
})
|
|
end,
|
|
},
|
|
{
|
|
"nvim-mini/mini.pairs",
|
|
event = "InsertEnter",
|
|
opts = {},
|
|
},
|
|
}
|