All-in-one plugin #
Library of 45+ independent Lua modules improving overall Neovim (version 0.10 and higher) experience with minimal effort. They all share same configuration approaches and general design principles.
Think about this project as "Swiss Army knife" among Neovim plugins: it has many different independent tools (modules) suitable for most common tasks. Each module can be used separately without any startup and usage overhead.
If you want to help this project grow but don't know where to start:
Leave a star for 'mini.nvim' (on any supported code forge) and/or any other MINI projects.
Check out contributing guides.
See change log for a history of changes, including current development version.
See MiniMax for a full config example based on 'mini.nvim'.
Note
This was previously hosted at echasnovski/mini.nvim. It was transferred to a dedicated organization to improve long term project stability. See more details here.
Table of contents #
Installation
Modules
General principles
Plugin color schemes
Planned modules
Installation #
This project is hosted on several code forges (use preferred link in the installation code snippet):
https://github.com/nvim-mini/mini.nvim (main)
https://tangled.org/nvim-mini.org/mini.nvim (mirror)
https://codeberg.org/nvim-mini/mini.nvim (mirror)
There are two branches to install from:
main (default, recommended) will have latest development version of plugin. All changes since last stable release should be perceived as being in beta testing phase (meaning they already passed alpha-testing and are moderately settled).
stable will be updated only upon releases with code tested during public beta-testing phase in main branch.
Here are code snippets for some common installation methods:
(Recommended) With vim.pack (on Neovim 0.12 and newer):
Main branch:
vim.pack.add({ 'https://github.com/nvim-mini/mini.nvim' })
Stable branch:
vim.pack.add({
{ src = 'https://github.com/nvim-mini/mini.nvim', version = 'stable' },
})
Manually with git clone (compatible with mini.deps):
-- Put this at the top of 'init.lua'
local path_package = vim.fn.stdpath('data') .. '/site'
local mini_path = path_package .. '/pack/deps/start/mini.nvim'
if not vim.uv.fs_stat(mini_path) then
vim.cmd('echo "Installing `mini.nvim`" | redraw')
local clone_cmd = {
'git', 'clone', '--filter=blob:none',
-- Uncomment next line to use 'stable' branch
-- '--branch', 'stable',
'https://github.com/nvim-mini/mini.nvim', mini_path
}
vim.fn.system(clone_cmd)
vim.cmd('packadd mini.nvim | helptags ALL')
vim.cmd('echo "Installed `mini.nvim`" | redraw')
end
With folke/lazy.nvim:
Main branch:
{ 'nvim-mini/mini.nvim', version = false },
Stable branch:
{ 'nvim-mini/mini.nvim', version = '*' },
Every module is also distributed as a standalone Git repository. Check out module's information for more details.
Important: don't forget to call module's setup() (if required) to enable its functionality.
Note: if you are on Windows, there might be problems with too long file paths (like error: unable to create file <some file name>: Filename too long). Try doing one of the following:
Enable corresponding git global config value: git config --system core.longpaths true. Then try to reinstall.
Install plugin in other place with shorter path.
Modules #
'mini.nvim' contains many modules which is slightly daunting at first. All of them can be used independently, one at a time.
For easier exploration, here they are presented in groups based on module's primary functionality (although some modules can fit in several groups). See more detailed listing here.
Text editing #
These modules improve your text editing experience. Start with 'mini.ai', 'mini.operators', and 'mini.surround'.
Module
Description
Overview
Details
mini.ai
Extend and create a/i textobjects
README
Documentation
mini.align
Align text interactively
README
Documentation
mini.comment
Comment lines
README
Documentation
mini.completion
Completion and signature help
README
Documentation
mini.keymap
Special key mappings
README
Documentation
mini.move
Move any selection in any direction
README
Documentation
mini.operators
Text edit operators
README
Documentation
mini.pairs
Autopairs
README
Documentation
mini.snippets
Manage and expand snippets
README
Documentation
mini.splitjoin
Split and join arguments
README
Documentation
mini.surround
Surround actions
README
Documentation
General workflow #
These modules improve your general workflow. Start with 'mini.bracketed', 'mini.files', and 'mini.pick'.
Module
Description
Overview
Details
mini.basics
Common configuration presets
README
Documentation
mini.bracketed
Go forward/backward with square brackets
README
Documentation
mini.bufremove
Remove buffers
README
Documentation
mini.clue
Show next key clues
README
Documentation
mini.cmdline
Command line tweaks
README
Documentation
mini.deps
Plugin manager
README
Documentation
mini.diff
Work with diff hunks
README
Documentation
mini.extra
Extra 'mini.nvim' functionality
README
Documentation
mini.files
Navigate and manipulate file system
README
Documentation
mini.git
Git integration
README
Documentation
mini.input
Get user input
README
Documentation
mini.jump
Jump to next/previous single character
README
Documentation
mini.jump2d
Jump within visible lines
README
Documentation
mini.misc
Miscellaneous functions
README
Documentation
mini.pick
Pick anything
README
Documentation
mini.sessions
Session management
README
Documentation
mini.visits
Track and reuse file system visits
README
Documentation
Appearance #
These modules improve your Neovim appearance. Start with 'mini.hues', 'mini.icons', and 'mini.statusline'.
Module
Description
Overview
Details
mini.animate
Animate common Neovim actions
README
Documentation
mini.base16
Base16 colorscheme creation
README
Documentation
mini.colors
Tweak and save any color scheme
README
Documentation
mini.cursorword
Autohighlight word under cursor
README
Documentation
mini.hipatterns
Highlight patterns in text
README
Documentation
mini.hues
Generate configurable color scheme
README
Documentation
mini.icons
Icon provider
README
Documentation
mini.indentscope
Visualize and work with indent scope
README
Documentation
mini.map
Window with buffer text overview
README
Documentation
mini.notify
Show notifications
README
Documentation
mini.starter
Start screen
README
Documentation
mini.statuscolumn
Statuscolumn
README
Documentation
mini.statusline
Statusline
README
Documentation
mini.tabline
Tabline
README
Documentation
mini.trailspace
Trailspace (highlight and remove)
README
Documentation
Other #
These modules don't quite fit in any of the previous categories.
Module
Description
Overview
Details
mini.doc
Generate Neovim help files
README
Documentation
mini.fuzzy
Fuzzy matching
README
Documentation
mini.test
Test Neovim plugins
README
Documentation
General principles #
Design #
Each module is designed to solve a particular problem targeting balance between feature-richness (handling as many edge-cases as possible) and simplicity of implementation/support. Granted, not all of them ended up with the same balance, but it is the goal nevertheless.
Independence #
Modules are independent of each other and can be run without external dependencies. Although some of them may need dependencies for full experience.
Structure #
Each module is a submodule for a placeholder "mini" module. So, for example, "surround" module should be referred to as "mini.surround". As later will be explained, this plugin can also be referred to as "MiniSurround".
Setup #
Each module you want to use should be enabled separately with require(<name of module>).setup({}). Possibly replace {} with your config table or omit altogether to use defaults. You can supply only parts of config, the rest will be inferred from defaults.
Call to module's setup() always creates a global Lua object with coherent camel-case name: require('mini.surround').setup() creates _G.MiniSurround. This allows for a simpler usage of plugin functionality: instead of require('mini.surround') use MiniSurround (or manually :lua MiniSurround.* in command line); available from v:lua like v:lua.MiniSurround. Considering this, "module" and "Lua object" names can be used interchangeably: 'mini.surround' and 'MiniSurround' will mean the same thing.
Each supplied config table is stored in config field of global object. Like MiniSurround.config.
Values of config which affect runtime activity can be changed on the fly to have effect. For example, MiniSurround.config.n_lines can be changed during runtime; but changing MiniSurround.config.mappings won't have any effect (as mappings are created once during setup()).
If module works best with some specific non-default option value, it is set during setup(). If the value is not essential to module's functionality, it is done only if user or another plugin hasn't set it beforehand (no matter the value).
Buffer local configuration #
Each module can be additionally configured to use certain runtime config settings locally to buffer. See mini.nvim-buffer-local-config section in help file for more information.
Buffer names #
All module-related buffers are named according to the following format: mini<module-name>://<buffer-number>/<useful-info> (forward slashes are used on any platform; <useful-info> may be empty). This structure allows creating identifiable, reasonably unique, and useful buffer names. For example, 'mini.files' buffers are created per displayed directory/file with names like minifiles://10/path/to/displayed/directory.
Disabling #
Each module's core functionality can be disabled globally or locally to buffer. See "Disabling" section in module's help page for more details. See mini.nvim-disabling-recipes section in main help file for common recipes.
Silencing #
Each module providing non-error feedback (like a reminder to press a key after some idle time in 'mini.ai', 'mini.jump2d', 'mini.surround') can be configured to not do that by setting config.silent = true (either inside setup() call or on the fly).
Highlighting #
Appearance of module's output is controlled by certain set of highlight groups (see :h highlight-groups). By default they usually link to some semantically close built-in highlight group and are ensured to be defined after any color scheme takes effect. Use :highlight command or vim.api.nvim_set_hl() Lua function to customize highlighting. To see a more calibrated look, use 'mini.hues', 'mini.base16', or plugin's color scheme.
Stability #
Each module upon release is considered to be relatively stable: both in terms of setup and functionality. Any non-bugfix backward-incompatible change will be released gradually as much as possible.
Not filetype and language specific #
Including functionality which needs several filetype/language specific implementations is an explicit no-goal of this project. This is mostly due to the potential increase in maintenance to keep implementation up to date. However, any part which might need filetype/language specific tuning should be designed to allow it by letting user set proper buffer options and/or local configuration.
Text edit repeat #
All text edit mappings (like for operators, textobjects, motions) created by modules support built-in repeat functionality if technically possible. This includes dot-repeat, macros, and Neovim>=0.13 multicursor.
Plugin color schemes #
This plugin comes with several color schemes (all have both dark and light variants). Activate any of them as a regular colorscheme (like :colorscheme minischeme or vim.cmd.colorscheme('minischeme')).
Based on 'mini.hues' (recommended):
minischeme: blue and yellow main color scheme.
miniwinter: "icy winter" palette with azure background.
minispring: "blooming spring" palette with green background.
minisummer: "hot summer" palette with brown/yellow background.
miniautumn: "cooling autumn" palette with purple background.
randomhue: random background a
Texto de tangled.org tal como lo publicó, leído de su página y mostrado aquí con el formato de El Autómata. El original, en tangled.org · Volver a la noticia de El Autómata