Files
dotfiles/config/nvim-old/lua/plugins/init.lua
T

135 lines
5.0 KiB
Lua

return {
{ "nvim-lua/plenary.nvim", lazy = true },
{ "nvim-tree/nvim-web-devicons", lazy = true, opts = {} },
{
'nvim-mini/mini.extra',
lazy = true,
},
{
'nvim-mini/mini.ai',
lazy = false,
version = '*',
dependencies = {
'nvim-treesitter/nvim-treesitter-textobjects',
},
config = function()
local MiniExtra = require('mini.extra')
local ai = require('mini.ai')
local spec_treesitter = ai.gen_spec.treesitter
ai.setup({
custom_textobjects = {
F = spec_treesitter({ a = '@function.outer', i = '@function.inner' }),
C = spec_treesitter({ a = '@comment.outer', i = '@comment.inner' }),
P = spec_treesitter({ a = '@parameter.outer', i = '@parameter.inner' }),
O = spec_treesitter({ a = '@block.outter', i = '@block.inner' }),
k = spec_treesitter({ a = '@class.outer', i = '@class.inner' }),
o = spec_treesitter({
a = { '@conditional.outer', '@loop.outer' },
i = { '@conditional.inner', '@loop.inner' },
})
}
})
end
},
{
'nvim-mini/mini.move',
lazy = false,
version = '*',
opts = {}
},
{ 'nvim-mini/mini.align', lazy = false, version = '*', opts = {} },
{ 'nvim-mini/mini.bracketed', lazy = false, version = '*', opts = {} },
{
'nvim-mini/mini.operators',
lazy = false,
version = '*',
opts = {
evaluate = { prefix = 'g|', func = nil, },
exchange = { prefix = 'g.', reindent_linewise = true, },
multiply = { prefix = 'gm', func = nil, },
replace = { prefix = 'gk', reindent_linewise = true, },
sort = { prefix = 'gs', func = nil, }
}
},
{
'nvim-mini/mini.surround',
lazy = false,
version = '*',
opts = {
-- Add custom surroundings to be used on top of builtin ones. For more
-- information with examples, see `:h MiniSurround.config`.
-- custom_surroundings = {
-- s = { input = { '%[%[().-()%]%]' }, output = { left = '[[', right = ']]' } },
-- },
mappings = {
add = 'sa', -- Add surrounding in Normal and Visual modes
delete = 'sd', -- Delete surrounding
find = 'sf', -- Find surrounding (to the right)
find_left = 'sF', -- Find surrounding (to the left)
highlight = 'sh', -- Highlight surrounding
replace = 'sr', -- Replace surrounding
update_n_lines = 'sn', -- Update `n_lines`
suffix_last = 'l', -- Suffix to search with "prev" method
suffix_next = 'n', -- Suffix to search with "next" method
},
}
},
{
'nvim-mini/mini.splitjoin',
lazy = false,
version = false,
config = function()
require('mini.splitjoin').setup()
end,
},
{
"nvim-mini/mini.hipatterns",
lazy = false,
event = "BufReadPre",
config = function()
local MiniExtra = require("mini.extra")
local hi_words = MiniExtra.gen_highlighter.words
require('mini.hipatterns').setup({
highlighters = {
-- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
fixme = hi_words({ 'FIXME', 'Fixme', 'fixme' }, "MiniHipatternsFixme"),
hack = hi_words({ 'HACK', 'Hack', 'hack' }, "MiniHipatternsHack"),
todo = hi_words({ 'TODO', 'Todo', 'todo' }, "MiniHipatternsTodo"),
note = hi_words({ 'NOTE', 'Note', 'note' }, "MiniHipatternsNote"),
done = hi_words({ 'DONE', 'Done', 'done' }, "MiniHipatternsFixme"),
-- Highlight hex color strings (`#rrggbb`) using that color
-- hex_color = hipatterns.gen_highlighter.hex_color(),
},
})
end,
},
{
'nvim-mini/mini.files',
event = 'VeryLazy',
version = '*',
keys = {
{ "-", function() require("mini.files").open(vim.api.nvim_buf_get_name(0)) end, desc = "Open parent directory", mode = "n" },
{ "<leader>-", function() require("mini.files").open() end, desc = "File Explore", mode = "n" },
},
opts = {
mappings = {
go_in = "<CR>", -- Map both Enter and L to enter directories or open files
go_in_plus = "L",
go_out = "-",
go_out_plus = "H",
close = "<Esc>",
},
}
},
{
'nvim-mini/mini.sessions',
version = '*',
lazy = false,
config = function()
require('mini.sessions').setup()
end,
},
}