Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Library of 40+ independent Lua modules improving Neovim experience with minimal effort

License

NotificationsYou must be signed in to change notification settings

nvim-mini/mini.nvim

mini.nvim

All-in-one plugin

Library of 40+ independent Lua modules improving overallNeovim (version 0.9 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:

Seechange log for a history of changes, including current development version.

SeeMiniMax for a full config example based on 'mini.nvim'.

Note

This was previously hosted atechasnovski/mini.nvim. It was transferred to a dedicated organization to improve long term project stability. See more detailshere.

Table of contents

Installation

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 inmain branch.

Here are code snippets for some common installation methods:

  • Manually withgit clone (compatible withmini.deps):
-- Put this at the top of 'init.lua'localpath_package=vim.fn.stdpath('data')..'/site'localmini_path=path_package..'/pack/deps/start/mini.nvim'ifnotvim.loop.fs_stat(mini_path)thenvim.cmd('echo "Installing `mini.nvim`" | redraw')localclone_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
BranchCode snippet
Main{ 'nvim-mini/mini.nvim', version = false },
Stable{ 'nvim-mini/mini.nvim', version = '*' },
BranchCode snippet
MainPlug 'nvim-mini/mini.nvim'
StablePlug 'nvim-mini/mini.nvim', { 'branch': 'stable' }
  • 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'ssetup() (if required) to enable its functionality.

Note: if you are on Windows, there might be problems with too long file paths (likeerror: 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 listinghere.

Text editing

These modules improve your text editing experience. Start with 'mini.ai', 'mini.operators', and 'mini.surround'.

ModuleDescriptionOverviewDetails
mini.aiExtend and createa/i textobjectsREADMEDocumentation
mini.alignAlign text interactivelyREADMEDocumentation
mini.commentComment linesREADMEDocumentation
mini.completionCompletion and signature helpREADMEDocumentation
mini.keymapSpecial key mappingsREADMEDocumentation
mini.moveMove any selection in any directionREADMEDocumentation
mini.operatorsText edit operatorsREADMEDocumentation
mini.pairsAutopairsREADMEDocumentation
mini.snippetsManage and expand snippetsREADMEDocumentation
mini.splitjoinSplit and join argumentsREADMEDocumentation
mini.surroundSurround actionsREADMEDocumentation

General workflow

These modules improve your general workflow. Start with 'mini.bracketed', 'mini.files', and 'mini.pick'.

ModuleDescriptionOverviewDetails
mini.basicsCommon configuration presetsREADMEDocumentation
mini.bracketedGo forward/backward with square bracketsREADMEDocumentation
mini.bufremoveRemove buffersREADMEDocumentation
mini.clueShow next key cluesREADMEDocumentation
mini.depsPlugin managerREADMEDocumentation
mini.diffWork with diff hunksREADMEDocumentation
mini.extraExtra 'mini.nvim' functionalityREADMEDocumentation
mini.filesNavigate and manipulate file systemREADMEDocumentation
mini.gitGit integrationREADMEDocumentation
mini.jumpJump to next/previous single characterREADMEDocumentation
mini.jump2dJump within visible linesREADMEDocumentation
mini.miscMiscellaneous functionsREADMEDocumentation
mini.pickPick anythingREADMEDocumentation
mini.sessionsSession managementREADMEDocumentation
mini.visitsTrack and reuse file system visitsREADMEDocumentation

Appearance

These modules improve your Neovim appearance. Start with 'mini.hues', 'mini.icons', and 'mini.statusline'.

ModuleDescriptionOverviewDetails
mini.animateAnimate common Neovim actionsREADMEDocumentation
mini.base16Base16 colorscheme creationREADMEDocumentation
mini.colorsTweak and save any color schemeREADMEDocumentation
mini.cursorwordAutohighlight word under cursorREADMEDocumentation
mini.hipatternsHighlight patterns in textREADMEDocumentation
mini.huesGenerate configurable color schemeREADMEDocumentation
mini.iconsIcon providerREADMEDocumentation
mini.indentscopeVisualize and work with indent scopeREADMEDocumentation
mini.mapWindow with buffer text overviewREADMEDocumentation
mini.notifyShow notificationsREADMEDocumentation
mini.starterStart screenREADMEDocumentation
mini.statuslineStatuslineREADMEDocumentation
mini.tablineTablineREADMEDocumentation
mini.trailspaceTrailspace (highlight and remove)READMEDocumentation

Other

These modules don't quite fit in any of the previous categories.

ModuleDescriptionOverviewDetails
mini.docGenerate Neovim help filesREADMEDocumentation
mini.fuzzyFuzzy matchingREADMEDocumentation
mini.testTest Neovim pluginsREADMEDocumentation

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 withrequire(<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'ssetup() 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 ofrequire('mini.surround') useMiniSurround (or manually:lua MiniSurround.* in command line); available fromv:lua likev:lua.MiniSurround. Considering this, "module" and "Lua object" names can be used interchangeably: 'mini.surround' and 'MiniSurround' will mean the same thing.

  • Each suppliedconfig table is stored inconfig field of global object. LikeMiniSurround.config.

  • Values ofconfig 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 changingMiniSurround.config.mappings won't have any effect (as mappings are created once duringsetup()).

  • If module works best with some specific non-default option value, it is set duringsetup(). 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. Seemini.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 likeminifiles://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. Seemini.nvim-disabling-recipes section in main help file for common recipes.

Silencing

Each module providing non-error feedback can be configured to not do that by settingconfig.silent = true (either insidesetup() 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 orvim.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.

Plugin color schemes

This plugin comes with several color schemes (all have both dark and light variants). Activate any of them as a regularcolorscheme (like:colorscheme miniwinter orvim.cmd.colorscheme('miniwinter')).

  • Based on'mini.hues' (recommended):

    • 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 and foreground of the same hue with medium saturation.

    You can see how they look in'mini.hues' README.

  • Based on'mini.base16':

    • minicyan: cyan and grey main colors with medium contrast and saturation palette.
    • minischeme: blue and yellow main colors with high contrast and saturation palette.

    You can see how they look in'mini.base16' README.

Planned modules

This is the list of modules I currently intend to implement eventually (as my free time and dedication will allow), in alphabetical order:

  • 'mini.abbrev' - helper to manage/setup Insert mode abbreviations.
  • 'mini.cmdline' - improved Command line. Possibly with customvim.ui.input implementation.
  • 'mini.cycle' - cycle through alternatives with pre-defined rules. Something likemonaqa/dial.nvim andAndrewRadev/switch.vim
  • 'mini.folds' - more capable and user-friendly folds.
  • 'mini.repl' - extendable wrapper for REPLs with built-in support for R, Python, Julia, and maybe (just maybe) some AI tools.
  • 'mini.sendtext' - send text between buffers. In particular between regular and built-in terminal buffers.
  • 'mini.statuscolumn' - customizable 'statuscolumn'.
  • 'mini.terminals' - coherently manage interactive terminal buffers. Something likekassio/neoterm. Might also incorporate functionality to asynchronously run code in shell with post-processed results.
  • 'mini.quickfix' - more capable and user-friendly quickfix list. Possibly with preview and inline editing for search-and-replace workflow.
  • 'mini.windows' - window manager. Interactive picker, layout organizer, and maybe more.

About

Library of 40+ independent Lua modules improving Neovim experience with minimal effort

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp