mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-12 04:52:34 +00:00
chore(config): reorg of mini plugins
Signed-off-by: Ismo Vuorinen <ismo@ivuorinen.net>
This commit is contained in:
@@ -12,6 +12,42 @@ return {
|
|||||||
version = '*',
|
version = '*',
|
||||||
priority = 1001,
|
priority = 1001,
|
||||||
config = function()
|
config = function()
|
||||||
|
-- ╭─────────────────────────────────────────────────────────╮
|
||||||
|
-- │ Text editing │
|
||||||
|
-- ╰─────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
|
-- 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 }
|
||||||
|
|
||||||
|
-- Comment lines
|
||||||
|
require('mini.comment').setup()
|
||||||
|
|
||||||
|
-- Text edit operators
|
||||||
|
-- g= - Evaluate text and replace with output
|
||||||
|
-- gx - Exchange text regions
|
||||||
|
-- gm - Multiply (duplicate) text
|
||||||
|
-- gr - Replace text with register
|
||||||
|
-- gs - Sort text
|
||||||
|
require('mini.operators').setup()
|
||||||
|
|
||||||
|
-- Split and join arguments, lists, and other sequences
|
||||||
|
require('mini.splitjoin').setup()
|
||||||
|
|
||||||
|
-- Fast and feature-rich surround actions
|
||||||
|
-- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren
|
||||||
|
-- - sd' - [S]urround [D]elete [']quotes
|
||||||
|
-- - sr)' - [S]urround [R]eplace [)] [']
|
||||||
|
-- - sff - find right (`sf`) part of surrounding function call (`f`)
|
||||||
|
require('mini.surround').setup()
|
||||||
|
|
||||||
|
-- ╭─────────────────────────────────────────────────────────╮
|
||||||
|
-- │ General workflow │
|
||||||
|
-- ╰─────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
-- Presets for common options and mappings
|
-- Presets for common options and mappings
|
||||||
-- h: MiniBasics.config
|
-- h: MiniBasics.config
|
||||||
require('mini.basics').setup {
|
require('mini.basics').setup {
|
||||||
@@ -25,25 +61,12 @@ return {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- 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 }
|
|
||||||
|
|
||||||
-- Animate common Neovim actions
|
|
||||||
-- Replaced anuvyklack/windows.nvim
|
|
||||||
require('mini.animate').setup()
|
|
||||||
|
|
||||||
-- Buffer removing (unshow, delete, wipeout), which saves window layout
|
-- Buffer removing (unshow, delete, wipeout), which saves window layout
|
||||||
-- Replaced famiu/bufdelete.nvim
|
|
||||||
require('mini.bufremove').setup()
|
require('mini.bufremove').setup()
|
||||||
|
|
||||||
-- Show next key clues
|
-- Show next key clues
|
||||||
-- Replaced folke/which-key.nvim
|
|
||||||
local miniclue = require 'mini.clue'
|
local miniclue = require 'mini.clue'
|
||||||
|
---@modules mini.clue
|
||||||
miniclue.setup {
|
miniclue.setup {
|
||||||
window = {
|
window = {
|
||||||
config = {
|
config = {
|
||||||
@@ -108,22 +131,30 @@ return {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Comment lines
|
|
||||||
-- Replaced numToStr/Comment.nvim
|
|
||||||
require('mini.comment').setup()
|
|
||||||
|
|
||||||
-- Highlight cursor word and its matches
|
|
||||||
require('mini.cursorword').setup()
|
|
||||||
|
|
||||||
-- Work with diff hunks
|
-- Work with diff hunks
|
||||||
-- Replaced lewis6991/gitsigns.nvim
|
|
||||||
require('mini.diff').setup()
|
require('mini.diff').setup()
|
||||||
|
|
||||||
-- Git integration
|
-- Git integration
|
||||||
require('mini.git').setup()
|
require('mini.git').setup()
|
||||||
|
|
||||||
|
-- Session management (read, write, delete)
|
||||||
|
require('mini.sessions').setup {
|
||||||
|
autowrite = true,
|
||||||
|
directory = vim.g.sessions_dir or vim.fn.stdpath 'data' .. '/sessions',
|
||||||
|
file = '',
|
||||||
|
}
|
||||||
|
|
||||||
|
-- ╭─────────────────────────────────────────────────────────╮
|
||||||
|
-- │ Appearance │
|
||||||
|
-- ╰─────────────────────────────────────────────────────────╯
|
||||||
|
|
||||||
|
-- Animate common Neovim actions
|
||||||
|
require('mini.animate').setup()
|
||||||
|
|
||||||
|
-- Highlight cursor word and its matches
|
||||||
|
require('mini.cursorword').setup()
|
||||||
|
|
||||||
-- Highlight patterns in text
|
-- Highlight patterns in text
|
||||||
-- Replaced folke/todo-comments.nvim
|
|
||||||
local hp = require 'mini.hipatterns'
|
local hp = require 'mini.hipatterns'
|
||||||
hp.setup {
|
hp.setup {
|
||||||
highlighters = {
|
highlighters = {
|
||||||
@@ -170,36 +201,16 @@ return {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Visualize and work with indent scope
|
-- Visualize and work with indent scope
|
||||||
-- Replaced lukas-reineke/indent-blankline.nvim
|
|
||||||
require('mini.indentscope').setup()
|
require('mini.indentscope').setup()
|
||||||
|
|
||||||
-- Text edit operators
|
|
||||||
-- g= - Evaluate text and replace with output
|
|
||||||
-- gx - Exchange text regions
|
|
||||||
-- gm - Multiply (duplicate) text
|
|
||||||
-- gr - Replace text with register
|
|
||||||
-- gs - Sort text
|
|
||||||
require('mini.operators').setup()
|
|
||||||
|
|
||||||
-- Session management (read, write, delete)
|
|
||||||
require('mini.sessions').setup {
|
|
||||||
autowrite = true,
|
|
||||||
directory = vim.g.sessions_dir or vim.fn.stdpath 'data' .. '/sessions',
|
|
||||||
file = '',
|
|
||||||
}
|
|
||||||
|
|
||||||
-- Split and join arguments, lists, and other sequences
|
|
||||||
-- Replaced Wansmer/treesj
|
|
||||||
require('mini.splitjoin').setup()
|
|
||||||
|
|
||||||
-- Fast and flexible start screen
|
-- Fast and flexible start screen
|
||||||
-- Replaced glepnir/dashboard-nvim
|
|
||||||
local starter = require 'mini.starter'
|
local starter = require 'mini.starter'
|
||||||
|
---@modules mini.starter
|
||||||
starter.setup {
|
starter.setup {
|
||||||
items = {
|
items = {
|
||||||
starter.sections.telescope(),
|
starter.sections.telescope(),
|
||||||
starter.sections.builtin_actions(),
|
starter.sections.builtin_actions(),
|
||||||
starter.sections.sessions(5, true),
|
starter.sections.recent_files(5),
|
||||||
},
|
},
|
||||||
content_hooks = {
|
content_hooks = {
|
||||||
starter.gen_hook.adding_bullet(),
|
starter.gen_hook.adding_bullet(),
|
||||||
@@ -209,25 +220,38 @@ return {
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Minimal and fast statusline module with opinionated default look
|
-- Minimal and fast statusline module with opinionated default look
|
||||||
-- Replaced nvim-lualine/lualine.nvim
|
|
||||||
local sl = require 'mini.statusline'
|
local sl = require 'mini.statusline'
|
||||||
|
---@modules mini.statusline
|
||||||
sl.setup {
|
sl.setup {
|
||||||
use_icons = true,
|
use_icons = true,
|
||||||
set_vim_settings = true,
|
set_vim_settings = true,
|
||||||
content = {
|
content = {
|
||||||
active = function()
|
active = function()
|
||||||
local mode, mode_hl = sl.section_mode { trunc_width = 120 }
|
local mode, mode_hl = sl.section_mode { trunc_width = 100 }
|
||||||
local git = sl.section_git { trunc_width = 9999 }
|
local git = sl.section_git { trunc_width = 40 }
|
||||||
local diagnostics = sl.section_diagnostics { trunc_width = 9999 }
|
local diagnostics = sl.section_diagnostics {
|
||||||
local filename = sl.section_filename { trunc_width = 9999 }
|
trunc_width = 75,
|
||||||
|
signs = {
|
||||||
|
ERROR = 'E ',
|
||||||
|
WARN = 'W ',
|
||||||
|
INFO = 'I ',
|
||||||
|
HINT = 'H ',
|
||||||
|
},
|
||||||
|
}
|
||||||
|
local lsp = MiniStatusline.section_lsp { trunc_width = 75 }
|
||||||
|
local filename = sl.section_filename { trunc_width = 140 }
|
||||||
local fileinfo = sl.section_fileinfo { trunc_width = 9999 }
|
local fileinfo = sl.section_fileinfo { trunc_width = 9999 }
|
||||||
local location = sl.section_location { trunc_width = 9999 }
|
local location = sl.section_location { trunc_width = 9999 }
|
||||||
return sl.combine_groups {
|
return sl.combine_groups {
|
||||||
{ hl = mode_hl, strings = { mode } },
|
{ hl = mode_hl, strings = { mode } },
|
||||||
{ hl = 'statuslineDevinfo', strings = { git, diagnostics } },
|
{
|
||||||
|
hl = 'MiniStatuslineDevinfo',
|
||||||
|
strings = { git, lsp },
|
||||||
|
},
|
||||||
'%<', -- Mark general truncate point
|
'%<', -- Mark general truncate point
|
||||||
{ hl = 'statuslineFilename', strings = { filename } },
|
{ hl = 'statuslineFilename', strings = { filename } },
|
||||||
'%=', -- End left alignment
|
'%=', -- End left alignment
|
||||||
|
{ hl = 'statuslineFileinfo', strings = { diagnostics } },
|
||||||
{ hl = 'statuslineFileinfo', strings = { fileinfo } },
|
{ hl = 'statuslineFileinfo', strings = { fileinfo } },
|
||||||
{ hl = mode_hl, strings = { location } },
|
{ hl = mode_hl, strings = { location } },
|
||||||
}
|
}
|
||||||
@@ -235,13 +259,6 @@ return {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Fast and feature-rich surround actions
|
|
||||||
-- Replaced kylechui/nvim-surround
|
|
||||||
-- - 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()
|
|
||||||
|
|
||||||
-- Work with trailing whitespace
|
-- Work with trailing whitespace
|
||||||
require('mini.trailspace').setup()
|
require('mini.trailspace').setup()
|
||||||
end,
|
end,
|
||||||
|
|||||||
Reference in New Issue
Block a user