131 lines
4.7 KiB
Lua
131 lines
4.7 KiB
Lua
-- mini
|
|
--
|
|
-- ibrary of 40+ independent Lua modules improving overall
|
|
-- Neovim (version 0.9 and higher) experience with minimal effort.
|
|
-- They all share same configuration approaches and general design principles.
|
|
--
|
|
-- https://github.com/echasnovski/mini.nvim
|
|
--
|
|
|
|
return {
|
|
{ -- Collection of various small independent plugins/modules
|
|
'echasnovski/mini.nvim',
|
|
version = false,
|
|
config = function()
|
|
-- Better Around/Inside textobjects
|
|
--
|
|
-- Examples:
|
|
-- - va) - [V]isually select [A]round [)]paren
|
|
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
|
-- - ci' - [C]hange [I]nside [']quote
|
|
require('mini.ai').setup { n_lines = 500 }
|
|
|
|
-- Add/delete/replace surroundings (brackets, quotes, etc.)
|
|
--
|
|
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
|
-- - sd' - [S]urround [D]elete [']quotes
|
|
-- - sr)' - [S]urround [R]eplace [)] [']
|
|
require('mini.surround').setup()
|
|
|
|
-- Simple and easy statusline.
|
|
-- You could remove this setup call if you don't like it,
|
|
-- and try some other statusline plugin
|
|
local statusline = require 'mini.statusline'
|
|
-- set use_icons to true if you have a Nerd Font
|
|
statusline.setup { use_icons = vim.g.have_nerd_font }
|
|
|
|
-- You can configure sections in the statusline by overriding their
|
|
-- default behavior. For example, here we set the section for
|
|
-- cursor location to LINE:COLUMN
|
|
---@diagnostic disable-next-line: duplicate-set-field
|
|
statusline.section_location = function()
|
|
return '%2l:%-2v'
|
|
end
|
|
|
|
local starter = require 'mini.starter'
|
|
local logo = require 'custom.plugins.logos'
|
|
starter.setup {
|
|
evaluate_single = true,
|
|
event = 'VimEnter',
|
|
header = table.concat(logo.neovim1, '\n'),
|
|
items = {
|
|
{ action = 'Neotree reveal=true position=float dir=~/.config/nvim/', name = ' Configuration', section = 'General' },
|
|
{ action = 'e .', name = ' Open', section = 'Files' },
|
|
{ action = 'Telescope find_files', name = ' Find file', section = 'Files' },
|
|
{ action = 'Telescope oldfiles', name = ' Recent files', section = 'Files' },
|
|
{ action = 'Telescope live_grep', name = ' Find text', section = 'Files' },
|
|
{ action = 'qa', name = ' Quit', section = 'General' },
|
|
},
|
|
content_hooks = {
|
|
require('mini.starter').gen_hook.adding_bullet ' ',
|
|
require('mini.starter').gen_hook.aligning('center', 'center'),
|
|
},
|
|
}
|
|
|
|
-- Simple way to visualize and work with indent scope
|
|
local indentscope = require 'mini.indentscope'
|
|
indentscope.setup {}
|
|
|
|
-- Simple way to (un)comment line(s)
|
|
local commenter = require 'mini.comment'
|
|
commenter.setup {
|
|
mappings = {
|
|
comment = '<leader>c',
|
|
comment_line = '<leader>c',
|
|
comment_visual = '<leader>c',
|
|
textobject = '<leader>c',
|
|
},
|
|
}
|
|
|
|
-- Minimal and fast tabline showing listed buffers
|
|
local tabline = require 'mini.tabline'
|
|
tabline.setup {}
|
|
|
|
-- Work with trailing whitespace
|
|
local trailspace = require 'mini.trailspace'
|
|
trailspace.setup {}
|
|
|
|
-- Highlight word under cursor
|
|
local cursorword = require 'mini.cursorword'
|
|
cursorword.setup {}
|
|
|
|
-- Animate common Neovim actions
|
|
local animate = require 'mini.animate'
|
|
animate.setup {
|
|
optional = true,
|
|
opts = {
|
|
cursor = {
|
|
enable = false,
|
|
},
|
|
},
|
|
}
|
|
|
|
-- -- Buffer removing (unshow, delete, wipeout), which saves window layout
|
|
-- local bufremove = require 'mini.bufremove'
|
|
-- bufremove.setup {}
|
|
|
|
local icons = require 'mini.icons'
|
|
icons.setup {
|
|
opts = {
|
|
file = {
|
|
['.chezmoiignore'] = { glyph = '', hl = 'MiniIconsGrey' },
|
|
['.chezmoiremove'] = { glyph = '', hl = 'MiniIconsGrey' },
|
|
['.chezmoiroot'] = { glyph = '', hl = 'MiniIconsGrey' },
|
|
['.chezmoiversion'] = { glyph = '', hl = 'MiniIconsGrey' },
|
|
['bash.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
|
['json.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
|
['ps1.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
|
['sh.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
|
['toml.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
|
['yaml.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
|
['zsh.tmpl'] = { glyph = '', hl = 'MiniIconsGrey' },
|
|
},
|
|
},
|
|
}
|
|
|
|
-- ... and there is more!
|
|
-- Check out: https://github.com/echasnovski/mini.nvim
|
|
end,
|
|
},
|
|
}
|