retrovim 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.conda/retrovim.yaml +259 -0
- package/.conda/terax.icns +0 -0
- package/.conda/terax.ico +0 -0
- package/.conda/terax.png +0 -0
- package/.github/workflows/release.yml +95 -0
- package/.gitmodules +3 -0
- package/.npm/kanata_touchcursor.js +28 -0
- package/.npm/nvim.js +26 -0
- package/.npm/yazi.js +26 -0
- package/.npm/zsh.js +17 -0
- package/.pip/kanata_touchcursor/__init__.py +28 -0
- package/.pip/nvim/__init__.py +31 -0
- package/.pip/yazi/__init__.py +31 -0
- package/.pip/zsh/__init__.py +22 -0
- package/CHANGELOG.md +26 -0
- package/LICENSE +674 -0
- package/README.md +336 -0
- package/kanata/touchcursor.kbd +164 -0
- package/nvim/init.lua +813 -0
- package/nvim/plugins/mini.nvim/.github/DISCUSSION_TEMPLATE/q-a.yml +72 -0
- package/nvim/plugins/mini.nvim/.github/ISSUE_TEMPLATE/bug-report.yml +136 -0
- package/nvim/plugins/mini.nvim/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/nvim/plugins/mini.nvim/.github/ISSUE_TEMPLATE/feature-request.yml +75 -0
- package/nvim/plugins/mini.nvim/.github/PULL_REQUEST_TEMPLATE.md +2 -0
- package/nvim/plugins/mini.nvim/.github/workflows/quality-control.yml +150 -0
- package/nvim/plugins/mini.nvim/.pre-commit-config.yaml +20 -0
- package/nvim/plugins/mini.nvim/.stylua.toml +7 -0
- package/nvim/plugins/mini.nvim/.styluaignore +1 -0
- package/nvim/plugins/mini.nvim/CHANGELOG.md +1894 -0
- package/nvim/plugins/mini.nvim/CODE_OF_CONDUCT.md +132 -0
- package/nvim/plugins/mini.nvim/CONTRIBUTING.md +331 -0
- package/nvim/plugins/mini.nvim/LICENSE +21 -0
- package/nvim/plugins/mini.nvim/MAINTAINING.md +330 -0
- package/nvim/plugins/mini.nvim/Makefile +51 -0
- package/nvim/plugins/mini.nvim/README.md +261 -0
- package/nvim/plugins/mini.nvim/TESTING.md +1011 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/README.md +35 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/benchmark.sh +56 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_dashboard-alpha.lua +21 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_dashboard-original.lua +17 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_dashboard-starter.lua +18 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_empty.lua +4 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_starter-default.lua +7 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_startify-alpha.lua +10 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_startify-original.lua +7 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_startify-starter.lua +20 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/install.sh +10 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/make_summary.py +68 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/startup-summary.md +10 -0
- package/nvim/plugins/mini.nvim/colors/miniautumn.lua +55 -0
- package/nvim/plugins/mini.nvim/colors/minicyan.lua +95 -0
- package/nvim/plugins/mini.nvim/colors/minischeme.lua +95 -0
- package/nvim/plugins/mini.nvim/colors/minispring.lua +53 -0
- package/nvim/plugins/mini.nvim/colors/minisummer.lua +49 -0
- package/nvim/plugins/mini.nvim/colors/miniwinter.lua +51 -0
- package/nvim/plugins/mini.nvim/colors/randomhue.lua +16 -0
- package/nvim/plugins/mini.nvim/doc/mini-ai.txt +889 -0
- package/nvim/plugins/mini.nvim/doc/mini-align.txt +923 -0
- package/nvim/plugins/mini.nvim/doc/mini-animate.txt +937 -0
- package/nvim/plugins/mini.nvim/doc/mini-base16.txt +285 -0
- package/nvim/plugins/mini.nvim/doc/mini-basics.txt +359 -0
- package/nvim/plugins/mini.nvim/doc/mini-bracketed.txt +622 -0
- package/nvim/plugins/mini.nvim/doc/mini-bufremove.txt +123 -0
- package/nvim/plugins/mini.nvim/doc/mini-clue.txt +760 -0
- package/nvim/plugins/mini.nvim/doc/mini-cmdline.txt +392 -0
- package/nvim/plugins/mini.nvim/doc/mini-colors.txt +880 -0
- package/nvim/plugins/mini.nvim/doc/mini-comment.txt +230 -0
- package/nvim/plugins/mini.nvim/doc/mini-completion.txt +477 -0
- package/nvim/plugins/mini.nvim/doc/mini-cursorword.txt +105 -0
- package/nvim/plugins/mini.nvim/doc/mini-deps.txt +590 -0
- package/nvim/plugins/mini.nvim/doc/mini-diff.txt +661 -0
- package/nvim/plugins/mini.nvim/doc/mini-doc.txt +434 -0
- package/nvim/plugins/mini.nvim/doc/mini-extra.txt +856 -0
- package/nvim/plugins/mini.nvim/doc/mini-files.txt +1018 -0
- package/nvim/plugins/mini.nvim/doc/mini-fuzzy.txt +160 -0
- package/nvim/plugins/mini.nvim/doc/mini-git.txt +425 -0
- package/nvim/plugins/mini.nvim/doc/mini-hipatterns.txt +489 -0
- package/nvim/plugins/mini.nvim/doc/mini-hues.txt +420 -0
- package/nvim/plugins/mini.nvim/doc/mini-icons.txt +508 -0
- package/nvim/plugins/mini.nvim/doc/mini-indentscope.txt +485 -0
- package/nvim/plugins/mini.nvim/doc/mini-input.txt +932 -0
- package/nvim/plugins/mini.nvim/doc/mini-jump.txt +202 -0
- package/nvim/plugins/mini.nvim/doc/mini-jump2d.txt +525 -0
- package/nvim/plugins/mini.nvim/doc/mini-keymap.txt +449 -0
- package/nvim/plugins/mini.nvim/doc/mini-map.txt +717 -0
- package/nvim/plugins/mini.nvim/doc/mini-misc.txt +431 -0
- package/nvim/plugins/mini.nvim/doc/mini-move.txt +181 -0
- package/nvim/plugins/mini.nvim/doc/mini-notify.txt +434 -0
- package/nvim/plugins/mini.nvim/doc/mini-nvim.txt +431 -0
- package/nvim/plugins/mini.nvim/doc/mini-operators.txt +472 -0
- package/nvim/plugins/mini.nvim/doc/mini-pairs.txt +346 -0
- package/nvim/plugins/mini.nvim/doc/mini-pick.txt +1535 -0
- package/nvim/plugins/mini.nvim/doc/mini-sessions.txt +239 -0
- package/nvim/plugins/mini.nvim/doc/mini-snippets.txt +1291 -0
- package/nvim/plugins/mini.nvim/doc/mini-splitjoin.txt +536 -0
- package/nvim/plugins/mini.nvim/doc/mini-starter.txt +618 -0
- package/nvim/plugins/mini.nvim/doc/mini-statusline.txt +361 -0
- package/nvim/plugins/mini.nvim/doc/mini-surround.txt +863 -0
- package/nvim/plugins/mini.nvim/doc/mini-tabline.txt +151 -0
- package/nvim/plugins/mini.nvim/doc/mini-test.txt +966 -0
- package/nvim/plugins/mini.nvim/doc/mini-trailspace.txt +91 -0
- package/nvim/plugins/mini.nvim/doc/mini-visits.txt +937 -0
- package/nvim/plugins/mini.nvim/logo.png +0 -0
- package/nvim/plugins/mini.nvim/lua/mini/ai.lua +2244 -0
- package/nvim/plugins/mini.nvim/lua/mini/align.lua +2076 -0
- package/nvim/plugins/mini.nvim/lua/mini/animate.lua +2127 -0
- package/nvim/plugins/mini.nvim/lua/mini/base16.lua +1752 -0
- package/nvim/plugins/mini.nvim/lua/mini/basics.lua +772 -0
- package/nvim/plugins/mini.nvim/lua/mini/bracketed.lua +2013 -0
- package/nvim/plugins/mini.nvim/lua/mini/bufremove.lua +283 -0
- package/nvim/plugins/mini.nvim/lua/mini/clue.lua +2096 -0
- package/nvim/plugins/mini.nvim/lua/mini/cmdline.lua +1182 -0
- package/nvim/plugins/mini.nvim/lua/mini/colors.lua +2483 -0
- package/nvim/plugins/mini.nvim/lua/mini/comment.lua +586 -0
- package/nvim/plugins/mini.nvim/lua/mini/completion.lua +2094 -0
- package/nvim/plugins/mini.nvim/lua/mini/cursorword.lua +311 -0
- package/nvim/plugins/mini.nvim/lua/mini/deps.lua +1660 -0
- package/nvim/plugins/mini.nvim/lua/mini/diff.lua +1938 -0
- package/nvim/plugins/mini.nvim/lua/mini/doc.lua +1371 -0
- package/nvim/plugins/mini.nvim/lua/mini/extra.lua +2290 -0
- package/nvim/plugins/mini.nvim/lua/mini/files.lua +3145 -0
- package/nvim/plugins/mini.nvim/lua/mini/fuzzy.lua +356 -0
- package/nvim/plugins/mini.nvim/lua/mini/git.lua +1737 -0
- package/nvim/plugins/mini.nvim/lua/mini/hipatterns.lua +1042 -0
- package/nvim/plugins/mini.nvim/lua/mini/hues.lua +2088 -0
- package/nvim/plugins/mini.nvim/lua/mini/icons.lua +2254 -0
- package/nvim/plugins/mini.nvim/lua/mini/indentscope.lua +1158 -0
- package/nvim/plugins/mini.nvim/lua/mini/init.lua +427 -0
- package/nvim/plugins/mini.nvim/lua/mini/input.lua +2183 -0
- package/nvim/plugins/mini.nvim/lua/mini/jump.lua +609 -0
- package/nvim/plugins/mini.nvim/lua/mini/jump2d.lua +1244 -0
- package/nvim/plugins/mini.nvim/lua/mini/keymap.lua +880 -0
- package/nvim/plugins/mini.nvim/lua/mini/map.lua +1709 -0
- package/nvim/plugins/mini.nvim/lua/mini/misc.lua +969 -0
- package/nvim/plugins/mini.nvim/lua/mini/move.lua +509 -0
- package/nvim/plugins/mini.nvim/lua/mini/notify.lua +938 -0
- package/nvim/plugins/mini.nvim/lua/mini/operators.lua +1349 -0
- package/nvim/plugins/mini.nvim/lua/mini/pairs.lua +657 -0
- package/nvim/plugins/mini.nvim/lua/mini/pick.lua +3876 -0
- package/nvim/plugins/mini.nvim/lua/mini/sessions.lua +689 -0
- package/nvim/plugins/mini.nvim/lua/mini/snippets.lua +2828 -0
- package/nvim/plugins/mini.nvim/lua/mini/splitjoin.lua +1132 -0
- package/nvim/plugins/mini.nvim/lua/mini/starter.lua +1599 -0
- package/nvim/plugins/mini.nvim/lua/mini/statusline.lua +686 -0
- package/nvim/plugins/mini.nvim/lua/mini/surround.lua +2388 -0
- package/nvim/plugins/mini.nvim/lua/mini/tabline.lua +564 -0
- package/nvim/plugins/mini.nvim/lua/mini/test.lua +2516 -0
- package/nvim/plugins/mini.nvim/lua/mini/trailspace.lua +215 -0
- package/nvim/plugins/mini.nvim/lua/mini/visits.lua +1577 -0
- package/nvim/plugins/mini.nvim/readmes/mini-ai.md +190 -0
- package/nvim/plugins/mini.nvim/readmes/mini-align.md +203 -0
- package/nvim/plugins/mini.nvim/readmes/mini-animate.md +214 -0
- package/nvim/plugins/mini.nvim/readmes/mini-base16.md +198 -0
- package/nvim/plugins/mini.nvim/readmes/mini-basics.md +184 -0
- package/nvim/plugins/mini.nvim/readmes/mini-bracketed.md +193 -0
- package/nvim/plugins/mini.nvim/readmes/mini-bufremove.md +139 -0
- package/nvim/plugins/mini.nvim/readmes/mini-clue.md +260 -0
- package/nvim/plugins/mini.nvim/readmes/mini-cmdline.md +183 -0
- package/nvim/plugins/mini.nvim/readmes/mini-colors.md +169 -0
- package/nvim/plugins/mini.nvim/readmes/mini-comment.md +183 -0
- package/nvim/plugins/mini.nvim/readmes/mini-completion.md +217 -0
- package/nvim/plugins/mini.nvim/readmes/mini-cursorword.md +137 -0
- package/nvim/plugins/mini.nvim/readmes/mini-deps.md +271 -0
- package/nvim/plugins/mini.nvim/readmes/mini-diff.md +289 -0
- package/nvim/plugins/mini.nvim/readmes/mini-doc.md +198 -0
- package/nvim/plugins/mini.nvim/readmes/mini-extra.md +158 -0
- package/nvim/plugins/mini.nvim/readmes/mini-files.md +247 -0
- package/nvim/plugins/mini.nvim/readmes/mini-fuzzy.md +134 -0
- package/nvim/plugins/mini.nvim/readmes/mini-git.md +168 -0
- package/nvim/plugins/mini.nvim/readmes/mini-hipatterns.md +176 -0
- package/nvim/plugins/mini.nvim/readmes/mini-hues.md +285 -0
- package/nvim/plugins/mini.nvim/readmes/mini-icons.md +183 -0
- package/nvim/plugins/mini.nvim/readmes/mini-indentscope.md +191 -0
- package/nvim/plugins/mini.nvim/readmes/mini-input.md +163 -0
- package/nvim/plugins/mini.nvim/readmes/mini-jump.md +161 -0
- package/nvim/plugins/mini.nvim/readmes/mini-jump2d.md +197 -0
- package/nvim/plugins/mini.nvim/readmes/mini-keymap.md +205 -0
- package/nvim/plugins/mini.nvim/readmes/mini-map.md +191 -0
- package/nvim/plugins/mini.nvim/readmes/mini-misc.md +145 -0
- package/nvim/plugins/mini.nvim/readmes/mini-move.md +163 -0
- package/nvim/plugins/mini.nvim/readmes/mini-notify.md +175 -0
- package/nvim/plugins/mini.nvim/readmes/mini-operators.md +193 -0
- package/nvim/plugins/mini.nvim/readmes/mini-pairs.md +158 -0
- package/nvim/plugins/mini.nvim/readmes/mini-pick.md +340 -0
- package/nvim/plugins/mini.nvim/readmes/mini-sessions.md +164 -0
- package/nvim/plugins/mini.nvim/readmes/mini-snippets.md +373 -0
- package/nvim/plugins/mini.nvim/readmes/mini-splitjoin.md +194 -0
- package/nvim/plugins/mini.nvim/readmes/mini-starter.md +176 -0
- package/nvim/plugins/mini.nvim/readmes/mini-statusline.md +155 -0
- package/nvim/plugins/mini.nvim/readmes/mini-surround.md +190 -0
- package/nvim/plugins/mini.nvim/readmes/mini-tabline.md +156 -0
- package/nvim/plugins/mini.nvim/readmes/mini-test.md +175 -0
- package/nvim/plugins/mini.nvim/readmes/mini-trailspace.md +137 -0
- package/nvim/plugins/mini.nvim/readmes/mini-visits.md +243 -0
- package/nvim/plugins/mini.nvim/scripts/dual_log.sh +13 -0
- package/nvim/plugins/mini.nvim/scripts/dual_push.sh +15 -0
- package/nvim/plugins/mini.nvim/scripts/dual_release.sh +102 -0
- package/nvim/plugins/mini.nvim/scripts/dual_sync.sh +115 -0
- package/nvim/plugins/mini.nvim/scripts/init-deps-example.lua +59 -0
- package/nvim/plugins/mini.nvim/scripts/lint-filename-length.sh +16 -0
- package/nvim/plugins/mini.nvim/scripts/lintcommit-ci.sh +18 -0
- package/nvim/plugins/mini.nvim/scripts/lintcommit.lua +393 -0
- package/nvim/plugins/mini.nvim/scripts/minidoc.lua +57 -0
- package/nvim/plugins/mini.nvim/scripts/minimal_init.lua +28 -0
- package/nvim/plugins/mini.nvim/scripts/minitest.lua +4 -0
- package/package.json +16 -0
- package/pyproject.toml +43 -0
- package/yazi/init.lua +12 -0
- package/yazi/keymap.toml +114 -0
- package/yazi/lesskey +5 -0
- package/yazi/plugins/bookmarks.yazi/main.lua +86 -0
- package/yazi/plugins/cd-git-root.yazi/main.lua +31 -0
- package/yazi/plugins/smart-enter.yazi/main.lua +11 -0
- package/yazi/theme.toml +26 -0
- package/yazi/yazi.toml +15 -0
- package/zsh/.zshrc +145 -0
- package/zsh/starship.toml +20 -0
- package/zsh/zsh-patina.toml +2 -0
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
# Maintaining
|
|
2
|
+
|
|
3
|
+
This document contains knowledge about specifically maintaining 'mini.nvim'. It assumes general knowledge about how Open Source and GitHub issues/PRs work.
|
|
4
|
+
|
|
5
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for how to generate help files, run tests, and format.
|
|
6
|
+
|
|
7
|
+
## General advice
|
|
8
|
+
|
|
9
|
+
- Follow common boilerplate code as much as possible when creating new module, as it makes easier to use "search and replace" in the long term. This includes:
|
|
10
|
+
- Documentation at the beginning: describing module, its setup, highlight groups, similar plugins, disabling, `setup()`, and `config`.
|
|
11
|
+
- Create and use `H` helper table at the beginning to allow having exported code written before helpers (severely improves readability).
|
|
12
|
+
- Structure of `setup()` function with its helper functions: `H.setup_config()`, `H.apply_config()`, `H.create_autocommands()`, `H.create_default_hl()`, `H.create_user_commands()`.
|
|
13
|
+
- Use module's `H.get_config()` and `H.is_disabled()` helpers. They both should respect buffer local configuration.
|
|
14
|
+
- From time to time some test cases will break on Neovim Nightly. This is usually due to the following reasons:
|
|
15
|
+
- There was an intended change in Neovim Nightly to which affected module(s) should adapt. Update module and/or tests.
|
|
16
|
+
- There was a change in Neovim Nightly disrupting only tests (usually screenshots due to changed way of how highlight attributes are computed). Update test: ideally so that it passes on all versions (by adjusting test logic or by selectively ignoring attributes / text of not matching lines with `ignore_text` / `ignore_attr` *behind narrowest Neovim version check*), but testing some parts only on Nightly is allowed if needed (regenerate screenshot on Nightly and verify it only on versions starting from it).
|
|
17
|
+
- There was an unintended change in Neovim Nightly which breaks functionality it should not break. Create an issue in ['neovim/neovim' repo](https://github.com/neovim/neovim). If the issue is not resolved for a long-ish time (i.e. more than a week) try to make tests pass and/or adapt the code to new behavior.
|
|
18
|
+
|
|
19
|
+
## Writing help annotations
|
|
20
|
+
|
|
21
|
+
Write help annotations in a way that after help generation they are usable in both built-in `:help` and on nvim-mini.org site. In particular:
|
|
22
|
+
|
|
23
|
+
- Prefer using `# Section ~` and `## Subsection ~` explicit sections. This allows more structured table of contents and adds anchors for all of them.
|
|
24
|
+
|
|
25
|
+
- Do not use explicit right aligned tags, as they result into a separate high level heading on the site. This usually breaks hierarchical structure of the page (like if added as part of a `MiniXxx.config` section, it ends the `config` section and starts its own). Prefer to "naturally" incorporate a tag into a text in first line of its info or add it directly below a dedicated section. Examples:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
--- # Important topic ~
|
|
29
|
+
--- *MiniXxx-important-topic*
|
|
30
|
+
---
|
|
31
|
+
--- A text about important topic of 'mini.xxx' module.
|
|
32
|
+
---
|
|
33
|
+
--- # Another topic ~
|
|
34
|
+
---
|
|
35
|
+
--- *MiniXxx-another-topic* is also important.
|
|
36
|
+
---
|
|
37
|
+
--- *MiniXxx-last-resort*
|
|
38
|
+
--- As last resort just add left aligned tag before first line
|
|
39
|
+
--- or at line start.
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
- Always explicitly close `>` multiline code block with line `<`. Note, that it renders as blank, so treat it like one (i.e. do not add another blank line below it to pad before next line).
|
|
43
|
+
|
|
44
|
+
- Have inline code blocks span only within a single line. Otherwise they are not highlighted properly.
|
|
45
|
+
|
|
46
|
+
- Do not use single quotes (`'`) to wrap word(s), as they have special meaning in help files (`'word'` describes option named `word`). Prefer || if it can be link to a built-in or 'mini.nvim' tag (like |'wrap'| for options and |mini.ai| for 'mini.nvim' modules). Use "" for regular language quotes. Use ``` `` ``` for everything else (like other plugin names, paths, etc.).
|
|
47
|
+
|
|
48
|
+
- All tags should start with `MiniXxx` (module's name; except special `*mini.xxx*`) or `:` (for user commands). Do not use asterisks for emphasis (use capitalized letters if absolutely needed).
|
|
49
|
+
|
|
50
|
+
- All tag links (`|word|`) should link to full existing tag name. Like `|'wrap'|` or `|nvim_win_set_cursor()|`
|
|
51
|
+
|
|
52
|
+
- Prefer using "naturally sounding" help tags for an entire section because they are transformed into a title. So like `---@tag MiniAi-builtin-textobjects` and not `---@tag MiniAi-textobjects-builtin`.
|
|
53
|
+
|
|
54
|
+
- As a consequence, don't add "# Title ~" title at the beginning of the section. This is a role for the tag (in both help file and site).
|
|
55
|
+
|
|
56
|
+
## Maintainer setup
|
|
57
|
+
|
|
58
|
+
Mandatory:
|
|
59
|
+
- Have `nvim` executable for latest stable release.
|
|
60
|
+
- Install [`git`](https://www.git-scm.com).
|
|
61
|
+
- Install [`StyLua`](https://github.com/JohnnyMorganz/StyLua) with version described in [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
62
|
+
- Install [`make`](https://www.gnu.org/software/make/).
|
|
63
|
+
|
|
64
|
+
Recommended:
|
|
65
|
+
- Have executables for all supported Neovim versions. For example, `nvim_07`, `nvim_08`, `nvim_09`, `nvim_010`. This is useful for running tests on multiple versions.
|
|
66
|
+
- Install [`lua-language-server`](https://github.com/LuaLS/lua-language-server).
|
|
67
|
+
- Install [`pre-commit`](https://pre-commit.com/#install) and enable it with `pre-commit install` and `pre-commit install --hook-type commit-msg` (run from repository's root).
|
|
68
|
+
- Set up 'mini.doc' and 'mini.test' and make mappings for the following frequently used commands:
|
|
69
|
+
- `'<Cmd>lua MiniDoc.generate()<CR>'` - to generate documentation.
|
|
70
|
+
- `'<Cmd>lua MiniTest.run_at_location()<CR>'` - to run test under cursor.
|
|
71
|
+
- `'<Cmd>lua MiniTest.run_file()<CR>'` - to run current test file.
|
|
72
|
+
|
|
73
|
+
## Supported Neovim versions
|
|
74
|
+
|
|
75
|
+
Aim for supporting 4 latest minor Neovim releases: current stable, current Nightly, and two latest stable releases.
|
|
76
|
+
|
|
77
|
+
For example, if 0.9.x is current stable, then all latest patch versions of 0.7, 0.8, 0.9 should be supported plus Nightly (0.10.0).
|
|
78
|
+
|
|
79
|
+
NOTE: some modules can have less supported versions during their release **only** if it is absolutely necessary for the core functionality.
|
|
80
|
+
|
|
81
|
+
## Dual distribution
|
|
82
|
+
|
|
83
|
+
Modules of 'mini.nvim' are distributed both as part of 'mini.nvim' repository and each one in its standalone repository. All development takes place in 'mini.nvim' while being synced to standalone ones. This is done by having special `sync` branch which points to the latest commit which was synced to standalone repositories.
|
|
84
|
+
|
|
85
|
+
Usual workflow involves performing these steps after every commit in 'mini.nvim':
|
|
86
|
+
|
|
87
|
+
- Check out to `main` branch.
|
|
88
|
+
- Ensure there are no immediate defects. Usually it means to wait until all CI checks passed.
|
|
89
|
+
- Run `make dual_sync`. This should:
|
|
90
|
+
- Create 'dual' directory if doesn't exist yet.
|
|
91
|
+
- Pull standalone repositories in 'dual/repos'.
|
|
92
|
+
- Create patches in 'dual/patches' and apply them for standalone repositories.
|
|
93
|
+
|
|
94
|
+
See 'scripts/dual_sync.sh' for more details.
|
|
95
|
+
- Run `make dual_log` to make sure that all and correct patches were applied. If some commit touches files from several modules, it results into commits for every affected standalone repository.
|
|
96
|
+
- Run `make dual_push`. This should:
|
|
97
|
+
- Push updates for affected standalone repositories.
|
|
98
|
+
- Clean up 'dual/patches'.
|
|
99
|
+
- Update `sync` branch to point to latest commit and push it to `origin`.
|
|
100
|
+
|
|
101
|
+
## Typical workflow for adding change
|
|
102
|
+
|
|
103
|
+
- Solve the problem.
|
|
104
|
+
- If change is in code, write test which breaks before problem is solved and passes after.
|
|
105
|
+
- If change introduces new config setting, consult with [dedicated checklist](#adding-new-config-settings).
|
|
106
|
+
- If change is worth to be seen by users (notable/breaking feature/fix), update 'CHANGELOG.md' following formatting from previous versions.
|
|
107
|
+
- Make sure that all tests in affected module(s) pass in all supported versions. See [Maintainer setup](#maintainer-setup) and ['Testing' section in CONTRIBUTING.md](CONTRIBUTING.md#testing).
|
|
108
|
+
- Stage and commit changes into a separate Git branch. Push the branch.
|
|
109
|
+
- Make sure that all CI pass.
|
|
110
|
+
- Merge branch into `main` branch. Push `main`.
|
|
111
|
+
- Make sure that all CI pass (again).
|
|
112
|
+
- Synchronize dual distribution:
|
|
113
|
+
- `make dual_sync` to sync.
|
|
114
|
+
- `make dual_log` and look at changes which are about to be applied to standalone repositories. Make sure that they are what you'd expect.
|
|
115
|
+
- `make dual_push` to push changes to standalone repositories.
|
|
116
|
+
|
|
117
|
+
## Typical workflow for processing a GitHub issue
|
|
118
|
+
|
|
119
|
+
- Add label with module name issue is about (if any). If issue is worded politely and/or with much details, thank user for opening an issue.
|
|
120
|
+
- Make sure the underlying problem is valid, i.e. it can be reproduced and the root cause is in this project. If it can not be reproduced, politely explain that and ask for more reproduction details. If the cause is not related to the project, politely explain that, close an issue, and direct towards the real root cause.
|
|
121
|
+
- Check already existing issues for possible duplicates. If there is at least one, review its reasoning before making decision about the current issue.
|
|
122
|
+
- Decide whether and how an issue should be resolved. Use ["General principles"](README.md#general-principles), module's help and code documentation while making the decision.
|
|
123
|
+
- If decision is to not resolve, politely explain that and close an issue (possibly mentioning similar reasoning in the past).
|
|
124
|
+
- If decision is to resolve, resolve the issue while putting `Resolve #xxx` at the bottom of commit message.
|
|
125
|
+
|
|
126
|
+
## Typical workflow for processing GitHub pull request
|
|
127
|
+
|
|
128
|
+
- Add label with module name pull request (PR) is about (if any). If PR is worded politely, thank user for doing that.
|
|
129
|
+
- Make sure the PR is valid, i.e. resolves an issue or adds a feature any of which aligns with the project. Ideally, it should have been agreed in the prior created issue (as per [CONTRIBUTING.md](CONTRIBUTING.md)).
|
|
130
|
+
- Review PR code and iterate towards making it have enough code quality. Use first steps of ["Typical workflow for adding change"](#typical-workflow-for-adding-change) as reference. **Note**: if what is left to do requires some overly specific project knowledge (i.e. can be done _much_ quicker if you know how, but requires non-trivial amount of reading/discovering first time), consider merging PR in a new separate branch and finish it manually (usually with preserving original commit authorship).
|
|
131
|
+
- When change is of enough quality, merge it and proceed treating it as regular change.
|
|
132
|
+
|
|
133
|
+
## Stopping support for old Neovim version
|
|
134
|
+
|
|
135
|
+
Begin the process of stopping official support for outdated Neovim version shortly after (week or two) the release of the new stable one. Usually it is stopping support for Neovim 0.x (say, 0.8) shortly after the release of 0.(x+3).0 (say, 0.11.0). The deprecation should be done in two stages:
|
|
136
|
+
|
|
137
|
+
- Stage 1, soft deprecation (to notify old version users about upcoming support drop):
|
|
138
|
+
- Add version of the following code snippet at the beginning of `setup()` function body in **every** module:
|
|
139
|
+
|
|
140
|
+
```lua
|
|
141
|
+
-- TODO: Remove after Neovim=0.8 support is dropped
|
|
142
|
+
if vim.fn.has('nvim-0.9') == 0 then
|
|
143
|
+
vim.notify(
|
|
144
|
+
'(mini.ai) Neovim<0.9 is soft deprecated (module works but not supported).'
|
|
145
|
+
.. ' It will be deprecated after next "mini.nvim" release (module might not work).'
|
|
146
|
+
.. ' Please update your Neovim version.'
|
|
147
|
+
)
|
|
148
|
+
end
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
- Modify CI to not test on old Neovim version.
|
|
152
|
+
- Update issue template to not include old Neovim version.
|
|
153
|
+
- Update README and repo description to indicate new oldest supported Neovim version.
|
|
154
|
+
- Wait for a considerable amount of time (at least about a month) *and* a new 'mini.nvim' stable release (so that there is no actual deprecation in the stable release).
|
|
155
|
+
|
|
156
|
+
- Stage 2, deprecation:
|
|
157
|
+
- Remove all notification snippets added in Stage 1.
|
|
158
|
+
- Adjust code that is conditioned on `vim.fn.has('nvim-0.x')` and `vim.fn.exists('+option')` (if the option is present in all currently supported Neovim versions).
|
|
159
|
+
- Adjust code/comments/documentation that contains any combination of `Neovim{<,<=,=,>=,>}{0.x,0.(x+1)}` (like `Neovim<0.x`, `Neovim>=0.(x+1)`, etc.).
|
|
160
|
+
- Add entry "Stop official support of Neovim 0.x." in 'CHANGELOG.md' at the start of current development version block.
|
|
161
|
+
|
|
162
|
+
## Reacting to new minor Neovim version
|
|
163
|
+
|
|
164
|
+
- Modify CI to test on new Neovim version.
|
|
165
|
+
- Update issue template to mention new Neovim version as released one, make it default choice, and bump Nightly version.
|
|
166
|
+
|
|
167
|
+
## Reacting to failing tests after Neovim Nightly changes
|
|
168
|
+
|
|
169
|
+
As Neovim is in active development, from time to time there will be test failures only on Neovim Nightly (and not on earlier versions). Adjusting tests to pass on all supported versions is important. The sooner the better, as it will allow for an easier deduction of what Neovim change is responsible here.
|
|
170
|
+
|
|
171
|
+
For examples of how this was done in the past, search `git log --oneline` output for "Nightly". This is probably the best way to learn about different approaches.
|
|
172
|
+
|
|
173
|
+
Here is a rough outline of how to act (with some Git commit hashes for illustration):
|
|
174
|
+
|
|
175
|
+
- Investigate if the change actually affects plugin functionality or is it only due to how the test is set up. Trying to manually reproduce the tested behavior on Nightly version is usually helpful for this decision.
|
|
176
|
+
|
|
177
|
+
Common examples of code related changes on Nightly:
|
|
178
|
+
- Changing how certain functions work: different arguments or a breaking change. Like in `848c5e8f428faf843051768e0d56104cd02aea1f`.
|
|
179
|
+
- Deprecating functions. Like in `0f85c464605cab5ba922644d3f2508c6d62f258e`.
|
|
180
|
+
|
|
181
|
+
However, usually it is about how a test is set up. Some common examples:
|
|
182
|
+
|
|
183
|
+
- Screenshot testing fails in areas that are not relevant to what is being tested. For example, highlighting attributes of the command line are different (like in `bac6c8bb77fe0a872719ea43c39e35c7c695f05e`) or the number of picker items in 'mini.pick' has changed (like in `b409fd1d8b9ea7ec7c0923eb2562b52ed5d1ab0a`)
|
|
184
|
+
- New option/mapping/command/etc. is added that broke assumptions about testing environment. Like in `0a8a1072137d916406507c941698a4bfa9dbbe7a`.
|
|
185
|
+
- Mocking (like LSP or system interaction) is not precise enough for the actually behavior anymore. Like in `c889667a9d73b106bd303a043eb37a91da4a41a2`.
|
|
186
|
+
|
|
187
|
+
- If the change affects the code:
|
|
188
|
+
- Adjust the code to work on all supported versions. This should always be the priority.
|
|
189
|
+
- If you think the Nightly change is unintended, open an issue upstream. Usually requires narrowing down to a reproducible example that does not involve this plugin at all (this is hard!).
|
|
190
|
+
- If needed, also adjust the tests to pass on all versions.
|
|
191
|
+
- If needed, prioritize version support in order: current release, Nightly, previous releases. Like if there is a question of different performance trade-offs.
|
|
192
|
+
|
|
193
|
+
- If the change only affects the test:
|
|
194
|
+
- First try to adjust the test to pass on all supported Neovim versions. Like adding different code paths for Neovim>=0.xx and Neovim<0.xx.
|
|
195
|
+
|
|
196
|
+
This is usually not the case for failing screenshot testing. If feasible and can be done concisely, replace failing screenshot testing with other means of equivalent testing. Like in `68955a915c45ae7c988c539abe6e89f0971a9a2d`.
|
|
197
|
+
|
|
198
|
+
- If the previous path is not possible or is significantly complex, make an educated decision of whether test fail is related to the actually tested functionality or not.
|
|
199
|
+
|
|
200
|
+
If it tests something crucial, make the best effort to test on the widest *forward-compatible* set of Neovim versions. I.e. it should test on Neovim>=0.yy and not Neovim<=0.yy.
|
|
201
|
+
|
|
202
|
+
Usually it is good enough for non-crucial part of the test to make only a forward-compatible test that starts on current Nightly (as long as that version is being tested in CI).
|
|
203
|
+
Like in `3f5d06a6f710966cb93baaadc4897eeb6d6210e5` or `be6979dddb339c4a548d2f1dac5c290b5bf73306`.
|
|
204
|
+
|
|
205
|
+
- Make adjustments and commit. Use commit message with title that contains "Nightly" and (preferably) with body describing the culprit for the change. This helps when searching the Git history for similar cases.
|
|
206
|
+
|
|
207
|
+
## Adding new config settings
|
|
208
|
+
|
|
209
|
+
- Add code which uses new setting.
|
|
210
|
+
- Add default value to `Mini*.config` definition.
|
|
211
|
+
- Update module's `H.setup_config()` with type check of new setting.
|
|
212
|
+
- Update tests to test default config value and its type check.
|
|
213
|
+
- Regenerate help file.
|
|
214
|
+
- Update module's README in 'readmes' directory.
|
|
215
|
+
- Possibly update demo for it to be aligned with current config values.
|
|
216
|
+
- Update 'CHANGELOG.md'. In module's section of current version add line starting with `- FEATURE: Implement ...`.
|
|
217
|
+
|
|
218
|
+
## Adding new color scheme plugin integration
|
|
219
|
+
|
|
220
|
+
- Update color scheme module file in a way similar to other already added plugins:
|
|
221
|
+
- Add definitions for highlight groups.
|
|
222
|
+
- Add plugin entry in a list of supported plugins in help annotations.
|
|
223
|
+
- Add plugin entry in a module's README.
|
|
224
|
+
- Regenerate documentation (see [corresponding section in CONTRIBUTING.md](CONTRIBUTING.md#generating-help-file)).
|
|
225
|
+
|
|
226
|
+
## Adding new module
|
|
227
|
+
|
|
228
|
+
### Preparation
|
|
229
|
+
|
|
230
|
+
- Create new module-related assets in https://github.com/nvim-mini/assets:
|
|
231
|
+
- Logo files. See 'logo-2/generate.lua' in the repo for more details.
|
|
232
|
+
- Demo video. Preferably under 1 minute screencast showcasing main features. Usually should also display module's config. Use config as close to bare MiniMax as possible. See other demos for reference.
|
|
233
|
+
- Write release blog post for nvim-mini.org. Copy file naming and structure from previous release posts. Mention future beta-testing issue with a placeholder link.
|
|
234
|
+
|
|
235
|
+
### Initial
|
|
236
|
+
|
|
237
|
+
- Add Lua source code in 'lua' directory.
|
|
238
|
+
- Add tests in 'tests' directory. Use 'tests/dir-xxx' name for module-specific non-test helpers.
|
|
239
|
+
- Update 'lua/init.lua' to mention new module: both in initial table of contents and list of modules.
|
|
240
|
+
- Add new module to the following files:
|
|
241
|
+
- 'scripts/minidoc.lua' to generate separate help file.
|
|
242
|
+
- 'scripts/dual_sync.sh' to include new module.
|
|
243
|
+
- 'scripts/dual_release.sh' to include new module.
|
|
244
|
+
- '.github/ISSUE_TEMPLATE/bug-report.yml' to be included in a dropdown menu.
|
|
245
|
+
- '.github/ISSUE_TEMPLATE/feature-request.yml' to be included in a dropdown menu.
|
|
246
|
+
- '.github/DISCUSSION_TEMPLATE/q-a.yml' to be included in a dropdown menu.
|
|
247
|
+
- Generate help files.
|
|
248
|
+
- Add README to 'readmes' directory following the structure of some of already existing README (preferably one of the latest). NOTE: comment out mentions of `stable` branch, as it won't work during beta-testing.
|
|
249
|
+
- Update main README:
|
|
250
|
+
- Mention new module in table of contents.
|
|
251
|
+
- Remove the module from "Planned modules" section (if present).
|
|
252
|
+
- Update 'CHANGELOG.md' to mention introduction of new module.
|
|
253
|
+
- Update 'CONTRIBUTING.md' to mention new highlight groups (if there are any).
|
|
254
|
+
- Create separate release branch and commit changes with message 'feat(xxx): add NEW MODULE'. NOTE: it is cleaner to synchronize standalone repositories prior to this commit.
|
|
255
|
+
- If there are new highlight groups, follow up with adding explicit support in color scheme modules.
|
|
256
|
+
- Push release branch. Make sure CI is green.
|
|
257
|
+
|
|
258
|
+
### Site integration
|
|
259
|
+
|
|
260
|
+
- Checkout to module release branch.
|
|
261
|
+
- Verify that nvim-mini.org handles new module. For that:
|
|
262
|
+
- Modify 'mini.nvim' dependency to checkout into release branch.
|
|
263
|
+
- `make sync`.
|
|
264
|
+
- Add release blog post.
|
|
265
|
+
- `quarto preview`.
|
|
266
|
+
- Verify that new content looks as expected.
|
|
267
|
+
|
|
268
|
+
### Release
|
|
269
|
+
|
|
270
|
+
- Make standalone plugin:
|
|
271
|
+
- Create new empty GitHub repository. Disable Issues, limit PRs.
|
|
272
|
+
- Clone the repo manually. Copy 'LICENSE' file to it, stage, and commit ("docs: add license"). Push.
|
|
273
|
+
- Add the following GitHub tags: "lua", "neovim", "neovim-plugin", "mini-nvim".
|
|
274
|
+
- Merge release branch into `main`. Push `main` and sync dual distribution.
|
|
275
|
+
- Check that standalone repo doesn't have some known issues:
|
|
276
|
+
- Make sure that all tracked files are synchronized. For list of tracked files see 'scripts/dual_sync.sh'. Initially they are 'doc/mini-xxx.txt', 'lua/mini/xxx.lua', 'LICENSE', and 'readmes/mini-xxx.md' (copied to be 'README.md' in standalone repository).
|
|
277
|
+
- Make sure that 'README.md' in standalone repository has appropriate relative links (see patch script).
|
|
278
|
+
- If there are issues, manually adjust in the repo, amend to latest commit, and force push.
|
|
279
|
+
- Create a beta-testing issue and pin it.
|
|
280
|
+
- Update nvim-mini.org:
|
|
281
|
+
- `make sync` on `main` branch.
|
|
282
|
+
- Add release blog post. NOTE: update it with proper beta-testing issue link.
|
|
283
|
+
- Push.
|
|
284
|
+
|
|
285
|
+
### Post release
|
|
286
|
+
|
|
287
|
+
- Wait for at least several weeks of beta-testing before including new module to MiniMax.
|
|
288
|
+
|
|
289
|
+
## Making stable release
|
|
290
|
+
|
|
291
|
+
### When
|
|
292
|
+
|
|
293
|
+
There is no clear guidelines for when a stable (minor) release should be made. Mostly "when if feels right" but "not too often". If it has to be put in words, it is something like "After 3 new modules have finished beta-testing or 4 months, whichever is sooner". No patch releases have been made yet.
|
|
294
|
+
|
|
295
|
+
### Preparation
|
|
296
|
+
|
|
297
|
+
- Write release blog post for nvim-mini.org. Copy file naming and structure from previous version release posts.
|
|
298
|
+
|
|
299
|
+
### Initial
|
|
300
|
+
|
|
301
|
+
- Check for `TODO`s about actions to be done *before* release.
|
|
302
|
+
- Checkout `release-0.xx` branch.
|
|
303
|
+
- Update READMEs of new modules to mention `stable` branch. Commit.
|
|
304
|
+
- Update latest version 'CHANGELOG.md': stop using development version and add a release date. Commit.
|
|
305
|
+
- Make a dummy change in 'lua/mini/init.lua' file to trigger code CI. Commit.
|
|
306
|
+
- Push to check on CI. **Proceed only if it is successful**.
|
|
307
|
+
- Remove dummy change commit.
|
|
308
|
+
|
|
309
|
+
### Release
|
|
310
|
+
|
|
311
|
+
- Merge `release-0.xx` to `main` and push it. Check that CI has passed.
|
|
312
|
+
- Synchronize standalone repositories.
|
|
313
|
+
- Make annotated tag: `git tag -a v0.xx.0 -m 'Version 0.xx.0'`. Push it.
|
|
314
|
+
- Make GitHub release. Get description from copying entries of version's 'CHANGELOG.md' section.
|
|
315
|
+
- Move `stable` branch to point at new tag (`git branch --force stable` when on latest tag's commit). Push it.
|
|
316
|
+
- Release standalone repositories. It should be enough to use 'scripts/dual_release.sh' like so:
|
|
317
|
+
```
|
|
318
|
+
# REPLACE `xx` with your version number
|
|
319
|
+
TAG_NAME="v0.xx.0" TAG_MESSAGE="Version 0.xx.0" make dual_release
|
|
320
|
+
```
|
|
321
|
+
- Check that standalone repositories actually got updates (tag + `stable`): manually visit some of them (at least new modules) on GitHub.
|
|
322
|
+
|
|
323
|
+
### After release
|
|
324
|
+
|
|
325
|
+
- Synchronize nvim-mini.org. Merge blog post. Push. Post on Reddit and other social media.
|
|
326
|
+
- Finish beta-testing new modules:
|
|
327
|
+
- Close beta-testing issues.
|
|
328
|
+
- Add them to MiniMax.
|
|
329
|
+
- Use development version in 'CHANGELOG.md' ('0.(xx+1).0-dev'). Commit.
|
|
330
|
+
- Check for `TODO`s about actions to be done *after* release.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
NVIM_EXEC ?= nvim
|
|
2
|
+
|
|
3
|
+
all: test documentation
|
|
4
|
+
|
|
5
|
+
# Use `make test` to run tests for all modules
|
|
6
|
+
test:
|
|
7
|
+
for nvim_exec in $(NVIM_EXEC); do \
|
|
8
|
+
printf "\n======\n\n" ; \
|
|
9
|
+
$$nvim_exec --version | head -n 1 && echo '' ; \
|
|
10
|
+
$$nvim_exec --headless --noplugin -u ./scripts/minimal_init.lua \
|
|
11
|
+
-c "lua require('mini.test').setup()" \
|
|
12
|
+
-c "lua MiniTest.run()" ; \
|
|
13
|
+
done
|
|
14
|
+
|
|
15
|
+
# Use `make test_xxx` to run tests for module 'mini.xxx'
|
|
16
|
+
TEST_MODULES = $(basename $(notdir $(wildcard tests/test_*.lua)))
|
|
17
|
+
|
|
18
|
+
$(TEST_MODULES):
|
|
19
|
+
for nvim_exec in $(NVIM_EXEC); do \
|
|
20
|
+
printf "\n======\n\n" ; \
|
|
21
|
+
$$nvim_exec --version | head -n 1 && echo '' ; \
|
|
22
|
+
$$nvim_exec --headless --noplugin -u ./scripts/minimal_init.lua \
|
|
23
|
+
-c "lua require('mini.test').setup()" \
|
|
24
|
+
-c "lua MiniTest.run_file('tests/$@.lua')" ; \
|
|
25
|
+
done
|
|
26
|
+
|
|
27
|
+
documentation:
|
|
28
|
+
$(NVIM_EXEC) --headless --noplugin -u ./scripts/minimal_init.lua -c "lua require('mini.doc').generate()" -c "qa!"
|
|
29
|
+
|
|
30
|
+
lintcommit-ci:
|
|
31
|
+
export LINTCOMMIT_STRICT=true && chmod u+x scripts/lintcommit-ci.sh && scripts/lintcommit-ci.sh
|
|
32
|
+
|
|
33
|
+
lint-filename-length-ci:
|
|
34
|
+
chmod u+x scripts/lint-filename-length.sh && scripts/lint-filename-length.sh
|
|
35
|
+
|
|
36
|
+
dual_sync:
|
|
37
|
+
chmod u+x scripts/dual_sync.sh && scripts/dual_sync.sh
|
|
38
|
+
|
|
39
|
+
dual_log:
|
|
40
|
+
chmod u+x scripts/dual_log.sh && scripts/dual_log.sh
|
|
41
|
+
|
|
42
|
+
dual_push:
|
|
43
|
+
chmod u+x scripts/dual_push.sh && scripts/dual_push.sh
|
|
44
|
+
printf "\n\033[1mAdjusting `sync` branch\033[0m\n"
|
|
45
|
+
git branch --force sync
|
|
46
|
+
git push origin sync
|
|
47
|
+
printf "\n\033[1mRemoving local patches\033[0m\n"
|
|
48
|
+
rm -r dual/patches
|
|
49
|
+
|
|
50
|
+
dual_release:
|
|
51
|
+
chmod u+x scripts/dual_release.sh && scripts/dual_release.sh "$(TAG_NAME)" "$(TAG_MESSAGE)"
|
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
<p align="center"> <img src="logo.png" alt="mini.nvim" style="max-width:100%;border:solid 2px"/> </p>
|
|
2
|
+
|
|
3
|
+
### All-in-one plugin
|
|
4
|
+
|
|
5
|
+
Library of 45+ independent Lua modules improving overall [Neovim](https://github.com/neovim/neovim) (version 0.10 and higher) experience with minimal effort. They all share same configuration approaches and general design principles.
|
|
6
|
+
|
|
7
|
+
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.
|
|
8
|
+
|
|
9
|
+
If you want to help this project grow but don't know where to start:
|
|
10
|
+
|
|
11
|
+
- Leave a Github star for 'mini.nvim' and/or any other [MINI projects](https://nvim-mini.org).
|
|
12
|
+
- Check out [contributing guides](CONTRIBUTING.md).
|
|
13
|
+
|
|
14
|
+
See [change log](CHANGELOG.md) for a history of changes, including current development version.
|
|
15
|
+
|
|
16
|
+
See [MiniMax](https://nvim-mini.org/MiniMax) for a full config example based on 'mini.nvim'.
|
|
17
|
+
|
|
18
|
+
> [!NOTE]
|
|
19
|
+
> 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](https://github.com/nvim-mini/mini.nvim/discussions/1970).
|
|
20
|
+
|
|
21
|
+
## Table of contents
|
|
22
|
+
|
|
23
|
+
- [Installation](#installation)
|
|
24
|
+
- [Modules](#modules)
|
|
25
|
+
- [General principles](#general-principles)
|
|
26
|
+
- [Plugin color schemes](#plugin-color-schemes)
|
|
27
|
+
- [Planned modules](#planned-modules)
|
|
28
|
+
|
|
29
|
+
## Installation
|
|
30
|
+
|
|
31
|
+
There are two branches to install from:
|
|
32
|
+
|
|
33
|
+
- `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).
|
|
34
|
+
- `stable` will be updated only upon releases with code tested during public beta-testing phase in `main` branch.
|
|
35
|
+
|
|
36
|
+
Here are code snippets for some common installation methods:
|
|
37
|
+
|
|
38
|
+
- (**Recommended**) With [vim.pack](https://neovim.io/doc/user/helptag.html?tag=vim.pack) (on Neovim 0.12 and newer):
|
|
39
|
+
|
|
40
|
+
- Main branch:
|
|
41
|
+
|
|
42
|
+
```lua
|
|
43
|
+
vim.pack.add({ 'https://github.com/nvim-mini/mini.nvim' })
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
- Stable branch:
|
|
47
|
+
|
|
48
|
+
```lua
|
|
49
|
+
vim.pack.add({
|
|
50
|
+
{ src = 'https://github.com/nvim-mini/mini.nvim', version = 'stable' },
|
|
51
|
+
})
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
- Manually with `git clone` (compatible with [mini.deps](https://nvim-mini.org/mini.nvim/readmes/mini-deps)):
|
|
55
|
+
|
|
56
|
+
```lua
|
|
57
|
+
-- Put this at the top of 'init.lua'
|
|
58
|
+
local path_package = vim.fn.stdpath('data') .. '/site'
|
|
59
|
+
local mini_path = path_package .. '/pack/deps/start/mini.nvim'
|
|
60
|
+
if not vim.loop.fs_stat(mini_path) then
|
|
61
|
+
vim.cmd('echo "Installing `mini.nvim`" | redraw')
|
|
62
|
+
local clone_cmd = {
|
|
63
|
+
'git', 'clone', '--filter=blob:none',
|
|
64
|
+
-- Uncomment next line to use 'stable' branch
|
|
65
|
+
-- '--branch', 'stable',
|
|
66
|
+
'https://github.com/nvim-mini/mini.nvim', mini_path
|
|
67
|
+
}
|
|
68
|
+
vim.fn.system(clone_cmd)
|
|
69
|
+
vim.cmd('packadd mini.nvim | helptags ALL')
|
|
70
|
+
vim.cmd('echo "Installed `mini.nvim`" | redraw')
|
|
71
|
+
end
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
- With [folke/lazy.nvim](https://github.com/folke/lazy.nvim):
|
|
75
|
+
|
|
76
|
+
- Main branch:
|
|
77
|
+
|
|
78
|
+
```lua
|
|
79
|
+
{ 'nvim-mini/mini.nvim', version = false },
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
- Stable branch:
|
|
83
|
+
|
|
84
|
+
```lua
|
|
85
|
+
{ 'nvim-mini/mini.nvim', version = '*' },
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
- Every module is also distributed as a standalone Git repository. Check out module's information for more details.
|
|
89
|
+
|
|
90
|
+
**Important**: don't forget to call module's `setup()` (if required) to enable its functionality.
|
|
91
|
+
|
|
92
|
+
**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:
|
|
93
|
+
|
|
94
|
+
- Enable corresponding git global config value: `git config --system core.longpaths true`. Then try to reinstall.
|
|
95
|
+
- Install plugin in other place with shorter path.
|
|
96
|
+
|
|
97
|
+
## Modules
|
|
98
|
+
|
|
99
|
+
'mini.nvim' contains many modules which is slightly daunting at first. All of them can be used independently, one at a time.
|
|
100
|
+
|
|
101
|
+
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](doc/mini-nvim.txt).
|
|
102
|
+
|
|
103
|
+
### Text editing
|
|
104
|
+
|
|
105
|
+
These modules improve your text editing experience. Start with 'mini.ai', 'mini.operators', and 'mini.surround'.
|
|
106
|
+
|
|
107
|
+
| Module | Description | Overview | Details |
|
|
108
|
+
|-----------------|---------------------------------------|--------------------------------------|------------------------------------------|
|
|
109
|
+
| mini.ai | Extend and create `a`/`i` textobjects | [README](readmes/mini-ai.md) | [Documentation](doc/mini-ai.txt) |
|
|
110
|
+
| mini.align | Align text interactively | [README](readmes/mini-align.md) | [Documentation](doc/mini-align.txt) |
|
|
111
|
+
| mini.comment | Comment lines | [README](readmes/mini-comment.md) | [Documentation](doc/mini-comment.txt) |
|
|
112
|
+
| mini.completion | Completion and signature help | [README](readmes/mini-completion.md) | [Documentation](doc/mini-completion.txt) |
|
|
113
|
+
| mini.keymap | Special key mappings | [README](readmes/mini-keymap.md) | [Documentation](doc/mini-keymap.txt) |
|
|
114
|
+
| mini.move | Move any selection in any direction | [README](readmes/mini-move.md) | [Documentation](doc/mini-move.txt) |
|
|
115
|
+
| mini.operators | Text edit operators | [README](readmes/mini-operators.md) | [Documentation](doc/mini-operators.txt) |
|
|
116
|
+
| mini.pairs | Autopairs | [README](readmes/mini-pairs.md) | [Documentation](doc/mini-pairs.txt) |
|
|
117
|
+
| mini.snippets | Manage and expand snippets | [README](readmes/mini-snippets.md) | [Documentation](doc/mini-snippets.txt) |
|
|
118
|
+
| mini.splitjoin | Split and join arguments | [README](readmes/mini-splitjoin.md) | [Documentation](doc/mini-splitjoin.txt) |
|
|
119
|
+
| mini.surround | Surround actions | [README](readmes/mini-surround.md) | [Documentation](doc/mini-surround.txt) |
|
|
120
|
+
|
|
121
|
+
### General workflow
|
|
122
|
+
|
|
123
|
+
These modules improve your general workflow. Start with 'mini.bracketed', 'mini.files', and 'mini.pick'.
|
|
124
|
+
|
|
125
|
+
| Module | Description | Overview | Details |
|
|
126
|
+
|----------------|------------------------------------------|-------------------------------------|-----------------------------------------|
|
|
127
|
+
| mini.basics | Common configuration presets | [README](readmes/mini-basics.md) | [Documentation](doc/mini-basics.txt) |
|
|
128
|
+
| mini.bracketed | Go forward/backward with square brackets | [README](readmes/mini-bracketed.md) | [Documentation](doc/mini-bracketed.txt) |
|
|
129
|
+
| mini.bufremove | Remove buffers | [README](readmes/mini-bufremove.md) | [Documentation](doc/mini-bufremove.txt) |
|
|
130
|
+
| mini.clue | Show next key clues | [README](readmes/mini-clue.md) | [Documentation](doc/mini-clue.txt) |
|
|
131
|
+
| mini.cmdline | Command line tweaks | [README](readmes/mini-cmdline.md) | [Documentation](doc/mini-cmdline.txt) |
|
|
132
|
+
| mini.deps | Plugin manager | [README](readmes/mini-deps.md) | [Documentation](doc/mini-deps.txt) |
|
|
133
|
+
| mini.diff | Work with diff hunks | [README](readmes/mini-diff.md) | [Documentation](doc/mini-diff.txt) |
|
|
134
|
+
| mini.extra | Extra 'mini.nvim' functionality | [README](readmes/mini-extra.md) | [Documentation](doc/mini-extra.txt) |
|
|
135
|
+
| mini.files | Navigate and manipulate file system | [README](readmes/mini-files.md) | [Documentation](doc/mini-files.txt) |
|
|
136
|
+
| mini.git | Git integration | [README](readmes/mini-git.md) | [Documentation](doc/mini-git.txt) |
|
|
137
|
+
| mini.input | Get user input | [README](readmes/mini-input.md) | [Documentation](doc/mini-input.txt) |
|
|
138
|
+
| mini.jump | Jump to next/previous single character | [README](readmes/mini-jump.md) | [Documentation](doc/mini-jump.txt) |
|
|
139
|
+
| mini.jump2d | Jump within visible lines | [README](readmes/mini-jump2d.md) | [Documentation](doc/mini-jump2d.txt) |
|
|
140
|
+
| mini.misc | Miscellaneous functions | [README](readmes/mini-misc.md) | [Documentation](doc/mini-misc.txt) |
|
|
141
|
+
| mini.pick | Pick anything | [README](readmes/mini-pick.md) | [Documentation](doc/mini-pick.txt) |
|
|
142
|
+
| mini.sessions | Session management | [README](readmes/mini-sessions.md) | [Documentation](doc/mini-sessions.txt) |
|
|
143
|
+
| mini.visits | Track and reuse file system visits | [README](readmes/mini-visits.md) | [Documentation](doc/mini-visits.txt) |
|
|
144
|
+
|
|
145
|
+
### Appearance
|
|
146
|
+
|
|
147
|
+
These modules improve your Neovim appearance. Start with 'mini.hues', 'mini.icons', and 'mini.statusline'.
|
|
148
|
+
|
|
149
|
+
| Module | Description | Overview | Details |
|
|
150
|
+
|------------------|--------------------------------------|---------------------------------------|-------------------------------------------|
|
|
151
|
+
| mini.animate | Animate common Neovim actions | [README](readmes/mini-animate.md) | [Documentation](doc/mini-animate.txt) |
|
|
152
|
+
| mini.base16 | Base16 colorscheme creation | [README](readmes/mini-base16.md) | [Documentation](doc/mini-base16.txt) |
|
|
153
|
+
| mini.colors | Tweak and save any color scheme | [README](readmes/mini-colors.md) | [Documentation](doc/mini-colors.txt) |
|
|
154
|
+
| mini.cursorword | Autohighlight word under cursor | [README](readmes/mini-cursorword.md) | [Documentation](doc/mini-cursorword.txt) |
|
|
155
|
+
| mini.hipatterns | Highlight patterns in text | [README](readmes/mini-hipatterns.md) | [Documentation](doc/mini-hipatterns.txt) |
|
|
156
|
+
| mini.hues | Generate configurable color scheme | [README](readmes/mini-hues.md) | [Documentation](doc/mini-hues.txt) |
|
|
157
|
+
| mini.icons | Icon provider | [README](readmes/mini-icons.md) | [Documentation](doc/mini-icons.txt) |
|
|
158
|
+
| mini.indentscope | Visualize and work with indent scope | [README](readmes/mini-indentscope.md) | [Documentation](doc/mini-indentscope.txt) |
|
|
159
|
+
| mini.map | Window with buffer text overview | [README](readmes/mini-map.md) | [Documentation](doc/mini-map.txt) |
|
|
160
|
+
| mini.notify | Show notifications | [README](readmes/mini-notify.md) | [Documentation](doc/mini-notify.txt) |
|
|
161
|
+
| mini.starter | Start screen | [README](readmes/mini-starter.md) | [Documentation](doc/mini-starter.txt) |
|
|
162
|
+
| mini.statusline | Statusline | [README](readmes/mini-statusline.md) | [Documentation](doc/mini-statusline.txt) |
|
|
163
|
+
| mini.tabline | Tabline | [README](readmes/mini-tabline.md) | [Documentation](doc/mini-tabline.txt) |
|
|
164
|
+
| mini.trailspace | Trailspace (highlight and remove) | [README](readmes/mini-trailspace.md) | [Documentation](doc/mini-trailspace.txt) |
|
|
165
|
+
|
|
166
|
+
### Other
|
|
167
|
+
|
|
168
|
+
These modules don't quite fit in any of the previous categories.
|
|
169
|
+
|
|
170
|
+
| Module | Description | Overview | Details |
|
|
171
|
+
|------------|----------------------------|---------------------------------|-------------------------------------|
|
|
172
|
+
| mini.doc | Generate Neovim help files | [README](readmes/mini-doc.md) | [Documentation](doc/mini-doc.txt) |
|
|
173
|
+
| mini.fuzzy | Fuzzy matching | [README](readmes/mini-fuzzy.md) | [Documentation](doc/mini-fuzzy.txt) |
|
|
174
|
+
| mini.test | Test Neovim plugins | [README](readmes/mini-test.md) | [Documentation](doc/mini-test.txt) |
|
|
175
|
+
|
|
176
|
+
## General principles
|
|
177
|
+
|
|
178
|
+
### Design
|
|
179
|
+
|
|
180
|
+
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.
|
|
181
|
+
|
|
182
|
+
### Independence
|
|
183
|
+
|
|
184
|
+
Modules are independent of each other and can be run without external dependencies. Although some of them may need dependencies for full experience.
|
|
185
|
+
|
|
186
|
+
### Structure
|
|
187
|
+
|
|
188
|
+
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".
|
|
189
|
+
|
|
190
|
+
### Setup
|
|
191
|
+
|
|
192
|
+
- 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.
|
|
193
|
+
|
|
194
|
+
- 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.
|
|
195
|
+
|
|
196
|
+
- Each supplied `config` table is stored in `config` field of global object. Like `MiniSurround.config`.
|
|
197
|
+
|
|
198
|
+
- 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()`).
|
|
199
|
+
|
|
200
|
+
- 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).
|
|
201
|
+
|
|
202
|
+
### Buffer local configuration
|
|
203
|
+
|
|
204
|
+
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.
|
|
205
|
+
|
|
206
|
+
### Buffer names
|
|
207
|
+
|
|
208
|
+
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`.
|
|
209
|
+
|
|
210
|
+
### Disabling
|
|
211
|
+
|
|
212
|
+
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.
|
|
213
|
+
|
|
214
|
+
### Silencing
|
|
215
|
+
|
|
216
|
+
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).
|
|
217
|
+
|
|
218
|
+
### Highlighting
|
|
219
|
+
|
|
220
|
+
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.
|
|
221
|
+
|
|
222
|
+
### Stability
|
|
223
|
+
|
|
224
|
+
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.
|
|
225
|
+
|
|
226
|
+
### Not filetype and language specific
|
|
227
|
+
|
|
228
|
+
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.
|
|
229
|
+
|
|
230
|
+
## Plugin color schemes
|
|
231
|
+
|
|
232
|
+
This plugin comes with several color schemes (all have both dark and light variants). Activate any of them as a regular `colorscheme` (like `:colorscheme miniwinter` or `vim.cmd.colorscheme('miniwinter')`).
|
|
233
|
+
|
|
234
|
+
- Based on ['mini.hues'](readmes/mini-hues.md) (recommended):
|
|
235
|
+
- `miniwinter`: "icy winter" palette with azure background.
|
|
236
|
+
- `minispring`: "blooming spring" palette with green background.
|
|
237
|
+
- `minisummer`: "hot summer" palette with brown/yellow background.
|
|
238
|
+
- `miniautumn`: "cooling autumn" palette with purple background.
|
|
239
|
+
- `randomhue`: random background and foreground of the same hue with medium saturation.
|
|
240
|
+
|
|
241
|
+
You can see how they look in ['mini.hues' README](readmes/mini-hues.md#bundled-color-schemes).
|
|
242
|
+
|
|
243
|
+
- Based on ['mini.base16'](readmes/mini-base16.md):
|
|
244
|
+
- `minicyan`: cyan and grey main colors with medium contrast and saturation palette.
|
|
245
|
+
- `minischeme`: blue and yellow main colors with high contrast and saturation palette.
|
|
246
|
+
|
|
247
|
+
You can see how they look in ['mini.base16' README](readmes/mini-base16.md#demo).
|
|
248
|
+
|
|
249
|
+
## Planned modules
|
|
250
|
+
|
|
251
|
+
This is the list of modules I currently intend to implement eventually (as my free time and dedication will allow), in alphabetical order:
|
|
252
|
+
|
|
253
|
+
- 'mini.abbrev' - helper to manage/setup Insert mode abbreviations.
|
|
254
|
+
- 'mini.cycle' - cycle through alternatives with pre-defined rules. Something like [monaqa/dial.nvim](https://github.com/monaqa/dial.nvim) and [AndrewRadev/switch.vim](https://github.com/AndrewRadev/switch.vim)
|
|
255
|
+
- 'mini.folds' - more capable and user-friendly folds.
|
|
256
|
+
- 'mini.repl' - extendable wrapper for REPLs with built-in support for R, Python, Julia, and maybe (just maybe) some AI tools.
|
|
257
|
+
- 'mini.sendtext' - send text between buffers. In particular between regular and built-in terminal buffers.
|
|
258
|
+
- 'mini.statuscolumn' - customizable 'statuscolumn'.
|
|
259
|
+
- 'mini.terminals' - coherently manage interactive terminal buffers. Something like [kassio/neoterm](https://github.com/kassio/neoterm). Might also incorporate functionality to asynchronously run code in shell with post-processed results.
|
|
260
|
+
- 'mini.quickfix' - more capable and user-friendly quickfix list. Possibly with preview and inline editing for search-and-replace workflow.
|
|
261
|
+
- 'mini.windows' - window manager. Interactive picker, layout organizer, and maybe more.
|