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.
Files changed (218) hide show
  1. package/.conda/retrovim.yaml +259 -0
  2. package/.conda/terax.icns +0 -0
  3. package/.conda/terax.ico +0 -0
  4. package/.conda/terax.png +0 -0
  5. package/.github/workflows/release.yml +95 -0
  6. package/.gitmodules +3 -0
  7. package/.npm/kanata_touchcursor.js +28 -0
  8. package/.npm/nvim.js +26 -0
  9. package/.npm/yazi.js +26 -0
  10. package/.npm/zsh.js +17 -0
  11. package/.pip/kanata_touchcursor/__init__.py +28 -0
  12. package/.pip/nvim/__init__.py +31 -0
  13. package/.pip/yazi/__init__.py +31 -0
  14. package/.pip/zsh/__init__.py +22 -0
  15. package/CHANGELOG.md +26 -0
  16. package/LICENSE +674 -0
  17. package/README.md +336 -0
  18. package/kanata/touchcursor.kbd +164 -0
  19. package/nvim/init.lua +813 -0
  20. package/nvim/plugins/mini.nvim/.github/DISCUSSION_TEMPLATE/q-a.yml +72 -0
  21. package/nvim/plugins/mini.nvim/.github/ISSUE_TEMPLATE/bug-report.yml +136 -0
  22. package/nvim/plugins/mini.nvim/.github/ISSUE_TEMPLATE/config.yml +5 -0
  23. package/nvim/plugins/mini.nvim/.github/ISSUE_TEMPLATE/feature-request.yml +75 -0
  24. package/nvim/plugins/mini.nvim/.github/PULL_REQUEST_TEMPLATE.md +2 -0
  25. package/nvim/plugins/mini.nvim/.github/workflows/quality-control.yml +150 -0
  26. package/nvim/plugins/mini.nvim/.pre-commit-config.yaml +20 -0
  27. package/nvim/plugins/mini.nvim/.stylua.toml +7 -0
  28. package/nvim/plugins/mini.nvim/.styluaignore +1 -0
  29. package/nvim/plugins/mini.nvim/CHANGELOG.md +1894 -0
  30. package/nvim/plugins/mini.nvim/CODE_OF_CONDUCT.md +132 -0
  31. package/nvim/plugins/mini.nvim/CONTRIBUTING.md +331 -0
  32. package/nvim/plugins/mini.nvim/LICENSE +21 -0
  33. package/nvim/plugins/mini.nvim/MAINTAINING.md +330 -0
  34. package/nvim/plugins/mini.nvim/Makefile +51 -0
  35. package/nvim/plugins/mini.nvim/README.md +261 -0
  36. package/nvim/plugins/mini.nvim/TESTING.md +1011 -0
  37. package/nvim/plugins/mini.nvim/benchmarks/starter/README.md +35 -0
  38. package/nvim/plugins/mini.nvim/benchmarks/starter/benchmark.sh +56 -0
  39. package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_dashboard-alpha.lua +21 -0
  40. package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_dashboard-original.lua +17 -0
  41. package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_dashboard-starter.lua +18 -0
  42. package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_empty.lua +4 -0
  43. package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_starter-default.lua +7 -0
  44. package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_startify-alpha.lua +10 -0
  45. package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_startify-original.lua +7 -0
  46. package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_startify-starter.lua +20 -0
  47. package/nvim/plugins/mini.nvim/benchmarks/starter/install.sh +10 -0
  48. package/nvim/plugins/mini.nvim/benchmarks/starter/make_summary.py +68 -0
  49. package/nvim/plugins/mini.nvim/benchmarks/starter/startup-summary.md +10 -0
  50. package/nvim/plugins/mini.nvim/colors/miniautumn.lua +55 -0
  51. package/nvim/plugins/mini.nvim/colors/minicyan.lua +95 -0
  52. package/nvim/plugins/mini.nvim/colors/minischeme.lua +95 -0
  53. package/nvim/plugins/mini.nvim/colors/minispring.lua +53 -0
  54. package/nvim/plugins/mini.nvim/colors/minisummer.lua +49 -0
  55. package/nvim/plugins/mini.nvim/colors/miniwinter.lua +51 -0
  56. package/nvim/plugins/mini.nvim/colors/randomhue.lua +16 -0
  57. package/nvim/plugins/mini.nvim/doc/mini-ai.txt +889 -0
  58. package/nvim/plugins/mini.nvim/doc/mini-align.txt +923 -0
  59. package/nvim/plugins/mini.nvim/doc/mini-animate.txt +937 -0
  60. package/nvim/plugins/mini.nvim/doc/mini-base16.txt +285 -0
  61. package/nvim/plugins/mini.nvim/doc/mini-basics.txt +359 -0
  62. package/nvim/plugins/mini.nvim/doc/mini-bracketed.txt +622 -0
  63. package/nvim/plugins/mini.nvim/doc/mini-bufremove.txt +123 -0
  64. package/nvim/plugins/mini.nvim/doc/mini-clue.txt +760 -0
  65. package/nvim/plugins/mini.nvim/doc/mini-cmdline.txt +392 -0
  66. package/nvim/plugins/mini.nvim/doc/mini-colors.txt +880 -0
  67. package/nvim/plugins/mini.nvim/doc/mini-comment.txt +230 -0
  68. package/nvim/plugins/mini.nvim/doc/mini-completion.txt +477 -0
  69. package/nvim/plugins/mini.nvim/doc/mini-cursorword.txt +105 -0
  70. package/nvim/plugins/mini.nvim/doc/mini-deps.txt +590 -0
  71. package/nvim/plugins/mini.nvim/doc/mini-diff.txt +661 -0
  72. package/nvim/plugins/mini.nvim/doc/mini-doc.txt +434 -0
  73. package/nvim/plugins/mini.nvim/doc/mini-extra.txt +856 -0
  74. package/nvim/plugins/mini.nvim/doc/mini-files.txt +1018 -0
  75. package/nvim/plugins/mini.nvim/doc/mini-fuzzy.txt +160 -0
  76. package/nvim/plugins/mini.nvim/doc/mini-git.txt +425 -0
  77. package/nvim/plugins/mini.nvim/doc/mini-hipatterns.txt +489 -0
  78. package/nvim/plugins/mini.nvim/doc/mini-hues.txt +420 -0
  79. package/nvim/plugins/mini.nvim/doc/mini-icons.txt +508 -0
  80. package/nvim/plugins/mini.nvim/doc/mini-indentscope.txt +485 -0
  81. package/nvim/plugins/mini.nvim/doc/mini-input.txt +932 -0
  82. package/nvim/plugins/mini.nvim/doc/mini-jump.txt +202 -0
  83. package/nvim/plugins/mini.nvim/doc/mini-jump2d.txt +525 -0
  84. package/nvim/plugins/mini.nvim/doc/mini-keymap.txt +449 -0
  85. package/nvim/plugins/mini.nvim/doc/mini-map.txt +717 -0
  86. package/nvim/plugins/mini.nvim/doc/mini-misc.txt +431 -0
  87. package/nvim/plugins/mini.nvim/doc/mini-move.txt +181 -0
  88. package/nvim/plugins/mini.nvim/doc/mini-notify.txt +434 -0
  89. package/nvim/plugins/mini.nvim/doc/mini-nvim.txt +431 -0
  90. package/nvim/plugins/mini.nvim/doc/mini-operators.txt +472 -0
  91. package/nvim/plugins/mini.nvim/doc/mini-pairs.txt +346 -0
  92. package/nvim/plugins/mini.nvim/doc/mini-pick.txt +1535 -0
  93. package/nvim/plugins/mini.nvim/doc/mini-sessions.txt +239 -0
  94. package/nvim/plugins/mini.nvim/doc/mini-snippets.txt +1291 -0
  95. package/nvim/plugins/mini.nvim/doc/mini-splitjoin.txt +536 -0
  96. package/nvim/plugins/mini.nvim/doc/mini-starter.txt +618 -0
  97. package/nvim/plugins/mini.nvim/doc/mini-statusline.txt +361 -0
  98. package/nvim/plugins/mini.nvim/doc/mini-surround.txt +863 -0
  99. package/nvim/plugins/mini.nvim/doc/mini-tabline.txt +151 -0
  100. package/nvim/plugins/mini.nvim/doc/mini-test.txt +966 -0
  101. package/nvim/plugins/mini.nvim/doc/mini-trailspace.txt +91 -0
  102. package/nvim/plugins/mini.nvim/doc/mini-visits.txt +937 -0
  103. package/nvim/plugins/mini.nvim/logo.png +0 -0
  104. package/nvim/plugins/mini.nvim/lua/mini/ai.lua +2244 -0
  105. package/nvim/plugins/mini.nvim/lua/mini/align.lua +2076 -0
  106. package/nvim/plugins/mini.nvim/lua/mini/animate.lua +2127 -0
  107. package/nvim/plugins/mini.nvim/lua/mini/base16.lua +1752 -0
  108. package/nvim/plugins/mini.nvim/lua/mini/basics.lua +772 -0
  109. package/nvim/plugins/mini.nvim/lua/mini/bracketed.lua +2013 -0
  110. package/nvim/plugins/mini.nvim/lua/mini/bufremove.lua +283 -0
  111. package/nvim/plugins/mini.nvim/lua/mini/clue.lua +2096 -0
  112. package/nvim/plugins/mini.nvim/lua/mini/cmdline.lua +1182 -0
  113. package/nvim/plugins/mini.nvim/lua/mini/colors.lua +2483 -0
  114. package/nvim/plugins/mini.nvim/lua/mini/comment.lua +586 -0
  115. package/nvim/plugins/mini.nvim/lua/mini/completion.lua +2094 -0
  116. package/nvim/plugins/mini.nvim/lua/mini/cursorword.lua +311 -0
  117. package/nvim/plugins/mini.nvim/lua/mini/deps.lua +1660 -0
  118. package/nvim/plugins/mini.nvim/lua/mini/diff.lua +1938 -0
  119. package/nvim/plugins/mini.nvim/lua/mini/doc.lua +1371 -0
  120. package/nvim/plugins/mini.nvim/lua/mini/extra.lua +2290 -0
  121. package/nvim/plugins/mini.nvim/lua/mini/files.lua +3145 -0
  122. package/nvim/plugins/mini.nvim/lua/mini/fuzzy.lua +356 -0
  123. package/nvim/plugins/mini.nvim/lua/mini/git.lua +1737 -0
  124. package/nvim/plugins/mini.nvim/lua/mini/hipatterns.lua +1042 -0
  125. package/nvim/plugins/mini.nvim/lua/mini/hues.lua +2088 -0
  126. package/nvim/plugins/mini.nvim/lua/mini/icons.lua +2254 -0
  127. package/nvim/plugins/mini.nvim/lua/mini/indentscope.lua +1158 -0
  128. package/nvim/plugins/mini.nvim/lua/mini/init.lua +427 -0
  129. package/nvim/plugins/mini.nvim/lua/mini/input.lua +2183 -0
  130. package/nvim/plugins/mini.nvim/lua/mini/jump.lua +609 -0
  131. package/nvim/plugins/mini.nvim/lua/mini/jump2d.lua +1244 -0
  132. package/nvim/plugins/mini.nvim/lua/mini/keymap.lua +880 -0
  133. package/nvim/plugins/mini.nvim/lua/mini/map.lua +1709 -0
  134. package/nvim/plugins/mini.nvim/lua/mini/misc.lua +969 -0
  135. package/nvim/plugins/mini.nvim/lua/mini/move.lua +509 -0
  136. package/nvim/plugins/mini.nvim/lua/mini/notify.lua +938 -0
  137. package/nvim/plugins/mini.nvim/lua/mini/operators.lua +1349 -0
  138. package/nvim/plugins/mini.nvim/lua/mini/pairs.lua +657 -0
  139. package/nvim/plugins/mini.nvim/lua/mini/pick.lua +3876 -0
  140. package/nvim/plugins/mini.nvim/lua/mini/sessions.lua +689 -0
  141. package/nvim/plugins/mini.nvim/lua/mini/snippets.lua +2828 -0
  142. package/nvim/plugins/mini.nvim/lua/mini/splitjoin.lua +1132 -0
  143. package/nvim/plugins/mini.nvim/lua/mini/starter.lua +1599 -0
  144. package/nvim/plugins/mini.nvim/lua/mini/statusline.lua +686 -0
  145. package/nvim/plugins/mini.nvim/lua/mini/surround.lua +2388 -0
  146. package/nvim/plugins/mini.nvim/lua/mini/tabline.lua +564 -0
  147. package/nvim/plugins/mini.nvim/lua/mini/test.lua +2516 -0
  148. package/nvim/plugins/mini.nvim/lua/mini/trailspace.lua +215 -0
  149. package/nvim/plugins/mini.nvim/lua/mini/visits.lua +1577 -0
  150. package/nvim/plugins/mini.nvim/readmes/mini-ai.md +190 -0
  151. package/nvim/plugins/mini.nvim/readmes/mini-align.md +203 -0
  152. package/nvim/plugins/mini.nvim/readmes/mini-animate.md +214 -0
  153. package/nvim/plugins/mini.nvim/readmes/mini-base16.md +198 -0
  154. package/nvim/plugins/mini.nvim/readmes/mini-basics.md +184 -0
  155. package/nvim/plugins/mini.nvim/readmes/mini-bracketed.md +193 -0
  156. package/nvim/plugins/mini.nvim/readmes/mini-bufremove.md +139 -0
  157. package/nvim/plugins/mini.nvim/readmes/mini-clue.md +260 -0
  158. package/nvim/plugins/mini.nvim/readmes/mini-cmdline.md +183 -0
  159. package/nvim/plugins/mini.nvim/readmes/mini-colors.md +169 -0
  160. package/nvim/plugins/mini.nvim/readmes/mini-comment.md +183 -0
  161. package/nvim/plugins/mini.nvim/readmes/mini-completion.md +217 -0
  162. package/nvim/plugins/mini.nvim/readmes/mini-cursorword.md +137 -0
  163. package/nvim/plugins/mini.nvim/readmes/mini-deps.md +271 -0
  164. package/nvim/plugins/mini.nvim/readmes/mini-diff.md +289 -0
  165. package/nvim/plugins/mini.nvim/readmes/mini-doc.md +198 -0
  166. package/nvim/plugins/mini.nvim/readmes/mini-extra.md +158 -0
  167. package/nvim/plugins/mini.nvim/readmes/mini-files.md +247 -0
  168. package/nvim/plugins/mini.nvim/readmes/mini-fuzzy.md +134 -0
  169. package/nvim/plugins/mini.nvim/readmes/mini-git.md +168 -0
  170. package/nvim/plugins/mini.nvim/readmes/mini-hipatterns.md +176 -0
  171. package/nvim/plugins/mini.nvim/readmes/mini-hues.md +285 -0
  172. package/nvim/plugins/mini.nvim/readmes/mini-icons.md +183 -0
  173. package/nvim/plugins/mini.nvim/readmes/mini-indentscope.md +191 -0
  174. package/nvim/plugins/mini.nvim/readmes/mini-input.md +163 -0
  175. package/nvim/plugins/mini.nvim/readmes/mini-jump.md +161 -0
  176. package/nvim/plugins/mini.nvim/readmes/mini-jump2d.md +197 -0
  177. package/nvim/plugins/mini.nvim/readmes/mini-keymap.md +205 -0
  178. package/nvim/plugins/mini.nvim/readmes/mini-map.md +191 -0
  179. package/nvim/plugins/mini.nvim/readmes/mini-misc.md +145 -0
  180. package/nvim/plugins/mini.nvim/readmes/mini-move.md +163 -0
  181. package/nvim/plugins/mini.nvim/readmes/mini-notify.md +175 -0
  182. package/nvim/plugins/mini.nvim/readmes/mini-operators.md +193 -0
  183. package/nvim/plugins/mini.nvim/readmes/mini-pairs.md +158 -0
  184. package/nvim/plugins/mini.nvim/readmes/mini-pick.md +340 -0
  185. package/nvim/plugins/mini.nvim/readmes/mini-sessions.md +164 -0
  186. package/nvim/plugins/mini.nvim/readmes/mini-snippets.md +373 -0
  187. package/nvim/plugins/mini.nvim/readmes/mini-splitjoin.md +194 -0
  188. package/nvim/plugins/mini.nvim/readmes/mini-starter.md +176 -0
  189. package/nvim/plugins/mini.nvim/readmes/mini-statusline.md +155 -0
  190. package/nvim/plugins/mini.nvim/readmes/mini-surround.md +190 -0
  191. package/nvim/plugins/mini.nvim/readmes/mini-tabline.md +156 -0
  192. package/nvim/plugins/mini.nvim/readmes/mini-test.md +175 -0
  193. package/nvim/plugins/mini.nvim/readmes/mini-trailspace.md +137 -0
  194. package/nvim/plugins/mini.nvim/readmes/mini-visits.md +243 -0
  195. package/nvim/plugins/mini.nvim/scripts/dual_log.sh +13 -0
  196. package/nvim/plugins/mini.nvim/scripts/dual_push.sh +15 -0
  197. package/nvim/plugins/mini.nvim/scripts/dual_release.sh +102 -0
  198. package/nvim/plugins/mini.nvim/scripts/dual_sync.sh +115 -0
  199. package/nvim/plugins/mini.nvim/scripts/init-deps-example.lua +59 -0
  200. package/nvim/plugins/mini.nvim/scripts/lint-filename-length.sh +16 -0
  201. package/nvim/plugins/mini.nvim/scripts/lintcommit-ci.sh +18 -0
  202. package/nvim/plugins/mini.nvim/scripts/lintcommit.lua +393 -0
  203. package/nvim/plugins/mini.nvim/scripts/minidoc.lua +57 -0
  204. package/nvim/plugins/mini.nvim/scripts/minimal_init.lua +28 -0
  205. package/nvim/plugins/mini.nvim/scripts/minitest.lua +4 -0
  206. package/package.json +16 -0
  207. package/pyproject.toml +43 -0
  208. package/yazi/init.lua +12 -0
  209. package/yazi/keymap.toml +114 -0
  210. package/yazi/lesskey +5 -0
  211. package/yazi/plugins/bookmarks.yazi/main.lua +86 -0
  212. package/yazi/plugins/cd-git-root.yazi/main.lua +31 -0
  213. package/yazi/plugins/smart-enter.yazi/main.lua +11 -0
  214. package/yazi/theme.toml +26 -0
  215. package/yazi/yazi.toml +15 -0
  216. package/zsh/.zshrc +145 -0
  217. package/zsh/starship.toml +20 -0
  218. package/zsh/zsh-patina.toml +2 -0
@@ -0,0 +1,590 @@
1
+ *mini.deps* Plugin manager
2
+
3
+ MIT License Copyright (c) 2024 Evgeni Chasnovski
4
+
5
+ ------------------------------------------------------------------------------
6
+ *MiniDeps*
7
+ *MiniDeps-dev-freeze*
8
+ As Neovim=0.12 introduced a built-in plugin manager |vim.pack| (which used this
9
+ module as a design reference), development of |mini.deps| is frozen. It means:
10
+
11
+ - On Neovim>=0.12 it is recommended to use |vim.pack| for plugin management
12
+ and |MiniMisc.safely()| as |MiniDeps.now()| and |MiniDeps.later()| alternative.
13
+ See https://echasnovski.com/vim-pack-guide for more details, including
14
+ recommendations about migration from |mini.deps|.
15
+
16
+ - This module will remain a part of |mini.nvim| at least until Neovim=0.11 is
17
+ supported. It might receive critical fixes, but likely no new features.
18
+
19
+ Features:
20
+
21
+ - Manage plugins utilizing Git and built-in |packages| with these actions:
22
+ - Add plugin to current session, download if absent. See |MiniDeps.add()|.
23
+ - Update with/without confirm, with/without parallel download of new data.
24
+ See |MiniDeps.update()|.
25
+ - Delete unused plugins with/without confirm. See |MiniDeps.clean()|.
26
+ - Get / set / save / load snapshot. See `MiniDeps.snap_*()` functions.
27
+
28
+ All main actions are available both as Lua functions and user commands
29
+ (see |MiniDeps-commands|).
30
+
31
+ - Minimal yet flexible plugin |MiniDeps-plugin-specification|:
32
+ - Plugin source.
33
+ - Name of target plugin directory.
34
+ - Checkout target: branch, commit, tag, etc.
35
+ - Monitor branch to track updates without checking out.
36
+ - Dependencies to be set up prior to the target plugin.
37
+ - Hooks to call before/after plugin is created/changed.
38
+
39
+ - Helpers implementing two-stage startup: |MiniDeps.now()| and |MiniDeps.later()|.
40
+ See |MiniDeps-overview| for how to implement basic lazy loading with them.
41
+
42
+ What it doesn't do:
43
+
44
+ - Manage plugins which are developed without Git. The suggested approach is
45
+ to create a separate package (see |packages|).
46
+
47
+ - Provide ways to completely remove or update plugin's functionality in
48
+ current session. Although this is partially doable, it can not be done
49
+ in full (yet) because plugins can have untraceable side effects
50
+ (autocmmands, mappings, etc.).
51
+ The suggested approach is to restart Nvim.
52
+
53
+ Sources with more details:
54
+ - |MiniDeps-overview|
55
+ - |MiniDeps-plugin-specification|
56
+ - |MiniDeps-commands|
57
+
58
+ # Dependencies ~
59
+
60
+ For most of its functionality this plugin relies on `git` CLI tool.
61
+ See https://git-scm.com/ for more information about how to install it.
62
+ Actual knowledge of Git is not required but helpful.
63
+
64
+ # Setup ~
65
+
66
+ This module needs a setup with `require('mini.deps').setup({})` (replace
67
+ `{}` with your `config` table). It will create global Lua table `MiniDeps`
68
+ which you can use for scripting or manually (with `:lua MiniDeps.*`).
69
+
70
+ See |MiniDeps.config| for `config` structure and default values.
71
+
72
+ You can override runtime config settings locally to buffer inside
73
+ `vim.b.minideps_config` which should have same structure as
74
+ `MiniDeps.config`. See |mini.nvim-buffer-local-config| for more details.
75
+
76
+ # Comparisons ~
77
+
78
+ - [folke/lazy.nvim](https://github.com/folke/lazy.nvim):
79
+ - More feature-rich and complex.
80
+ - Uses table specification with dedicated functions to add plugins,
81
+ while this module uses direct function call approach
82
+ (calling |MiniDeps.add()| ensures that plugin is usable).
83
+ - Uses version tags by default, while this module is more designed towards
84
+ tracking branches. Using tags is possible too (see |MiniDeps-overview|).
85
+
86
+ - [savq/paq-nvim](https://github.com/savq/paq-nvim):
87
+ - Overall less feature-rich than this module (by design).
88
+ - Uses array of plugin specifications inside `setup()` call to define which
89
+ plugins should be installed. Requires separate `:PaqInstall` call to
90
+ actually install them. This module ensures installation on first load.
91
+
92
+ - [junegunn/vim-plug](https://github.com/junegunn/vim-plug):
93
+ - Written in Vimscript, while this module is in Lua.
94
+ - Similar approach to defining and installing plugins as `savq/paq-nvim`.
95
+ - Has basic lazy-loading built-in, while this module does not (by design).
96
+
97
+ # Highlight groups ~
98
+ *MiniDeps-hl-groups*
99
+
100
+ Highlight groups are used inside confirmation buffers after
101
+ default |MiniDeps.update()| and |MiniDeps.clean()|.
102
+
103
+ - `MiniDepsChangeAdded` - added change (commit) during update.
104
+ - `MiniDepsChangeRemoved` - removed change (commit) during update.
105
+ - `MiniDepsHint` - various hints.
106
+ - `MiniDepsInfo` - various information.
107
+ - `MiniDepsMsgBreaking` - message for (conventional commit) breaking change.
108
+ - `MiniDepsPlaceholder` - placeholder when there is no valuable information.
109
+ - `MiniDepsTitle` - various titles.
110
+ - `MiniDepsTitleError` - title when plugin had errors during update.
111
+ - `MiniDepsTitleSame` - title when plugin has no changes to update.
112
+ - `MiniDepsTitleUpdate` - title when plugin has changes to update.
113
+
114
+ To change any highlight group, set it directly with |nvim_set_hl()|.
115
+
116
+ ------------------------------------------------------------------------------
117
+ *MiniDeps-overview*
118
+ # Directory structure ~
119
+
120
+ This module uses built-in |packages| to make plugins usable in current session.
121
+ It works with "pack/deps" package inside `config.path.package` directory.
122
+
123
+ By default "opt" subdirectory is used to install optional plugins which are
124
+ loaded on demand with |MiniDeps.add()|.
125
+ Non-optional plugins in "start" subdirectory are supported but only if moved
126
+ there manually after initial install. Use it if you know what you are doing.
127
+
128
+ # Add plugin ~
129
+
130
+ Use |MiniDeps.add()| to add plugin to current session. Supply plugin's URL
131
+ source as a string or |MiniDeps-plugin-specification| in general. If plugin is
132
+ not present in "pack/deps" package, it will be created (a.k.a. installed)
133
+ before processing anything else.
134
+
135
+ The recommended way of adding a plugin is by calling |MiniDeps.add()| in the
136
+ |init.lua| file (make sure |MiniDeps.setup()| is called prior): >lua
137
+
138
+ local add = MiniDeps.add
139
+
140
+ -- Add to current session (install if absent)
141
+ add({
142
+ source = 'neovim/nvim-lspconfig',
143
+ -- Supply dependencies near target plugin
144
+ depends = { 'williamboman/mason.nvim' },
145
+ })
146
+
147
+ add({
148
+ source = 'nvim-treesitter/nvim-treesitter',
149
+ -- Use 'master' while monitoring updates in 'main'
150
+ checkout = 'master',
151
+ monitor = 'main',
152
+ -- Perform action after every checkout
153
+ hooks = { post_checkout = function() vim.cmd('TSUpdate') end },
154
+ })
155
+ -- Possible to immediately execute code which depends on the added plugin
156
+ require('nvim-treesitter.configs').setup({
157
+ ensure_installed = { 'lua', 'vimdoc' },
158
+ highlight = { enable = true },
159
+ })
160
+ <
161
+ NOTE:
162
+ - To increase performance, `add()` only ensures presence on disk and
163
+ nothing else. In particular, it doesn't ensure `opts.checkout` state.
164
+ Update or modify plugin state explicitly (see later sections).
165
+
166
+ # Lazy loading ~
167
+
168
+ Any lazy-loading is assumed to be done manually by calling |MiniDeps.add()|
169
+ at appropriate time. This module provides helpers implementing special safe
170
+ two-stage loading:
171
+ - |MiniDeps.now()| safely executes code immediately. Use it to load plugins
172
+ with UI necessary to make initial screen draw.
173
+ - |MiniDeps.later()| schedules code to be safely executed later, preserving
174
+ order. Use it (with caution) for everything else which doesn't need
175
+ precisely timed effect, as it will be executed some time soon on one of
176
+ the next event loops. >lua
177
+
178
+ local now, later = MiniDeps.now, MiniDeps.later
179
+
180
+ -- Safely execute immediately
181
+ now(function() vim.cmd('colorscheme miniwinter') end)
182
+ now(function() require('mini.statusline').setup() end)
183
+
184
+ -- Safely execute later
185
+ later(function() require('mini.pick').setup() end)
186
+ <
187
+ # Update ~
188
+
189
+ To update plugins from current session with new data from their sources,
190
+ use |:DepsUpdate|. This will download updates (utilizing multiple cores) and
191
+ show confirmation buffer. Follow instructions at its top to finish an update.
192
+
193
+ NOTE: This updates plugins on disk which most likely won't affect current
194
+ session. Restart Nvim to have them properly loaded.
195
+
196
+ # Modify ~
197
+
198
+ To change plugin's specification (like set different `checkout`, etc.):
199
+ - Update corresponding |MiniDeps.add()| call.
200
+ - Run `:DepsUpdateOffline <plugin_name>`.
201
+ - Review changes and confirm.
202
+ - Restart Nvim.
203
+
204
+ NOTE: if `add()` prior used a single source string, make sure to convert
205
+ its argument to `{ source = '<previous_argument>', checkout = '<state>'}`
206
+
207
+ # Snapshots ~
208
+
209
+ Use |:DepsSnapSave| to save state of all plugins from current session into
210
+ a snapshot file (see `config.path.snapshot`).
211
+
212
+ Use |:DepsSnapLoad| to load snapshot. This will change (without confirmation)
213
+ state on disk. Plugins present in both snapshot file and current session
214
+ will be affected. Restart Nvim to see the effect.
215
+
216
+ NOTE: loading snapshot does not change plugin's specification defined inside
217
+ |MiniDeps.add()| call. This means that next update might change plugin's state.
218
+ To make it permanent, freeze plugin in target state manually.
219
+
220
+ # Freeze ~
221
+
222
+ Modify plugin's specification to have `checkout` pointing to a static
223
+ target: tag, state (commit hash), or `'HEAD'` (to freeze in current state).
224
+
225
+ Frozen plugins will not receive updates. You can monitor any new changes from
226
+ its source by "subscribing" to `monitor` branch which will be shown inside
227
+ confirmation buffer after |:DepsUpdate|.
228
+
229
+ Example: use `checkout = 'v0.10.0'` to freeze plugin at tag "v0.10.0" while
230
+ monitoring new versions in the log from `monitor` (usually default) branch.
231
+
232
+ # Rollback ~
233
+
234
+ To roll back after an unfortunate update:
235
+ - Get identifier of latest working state:
236
+ - Use |:DepsShowLog| to see update log, look for plugin's name, and copy
237
+ identifier listed as "State before:".
238
+ - See previously saved snapshot file for plugin's name and copy
239
+ identifier next to it.
240
+ - Freeze plugin at that state while monitoring appropriate branch.
241
+ Revert to previous shape of |MiniDeps.add()| call to resume updating.
242
+
243
+ # Remove ~
244
+
245
+ - Make sure that target plugin is not registered in current session.
246
+ Usually it means removing corresponding |MiniDeps.add()| call.
247
+ - Run |:DepsClean|. This will show confirmation buffer with a list of plugins to
248
+ be deleted from disk. Follow instructions at its top to finish cleaning.
249
+
250
+ Alternatively, manually delete plugin's directory from "pack/deps" package.
251
+
252
+ ------------------------------------------------------------------------------
253
+ *MiniDeps-plugin-specification*
254
+ Each plugin dependency is managed based on its specification (a.k.a. "spec").
255
+ See |MiniDeps-overview| for some examples.
256
+
257
+ Specification can be a single string which is inferred as:
258
+ - Plugin <name> if it doesn't contain "/".
259
+ - Plugin <source> otherwise.
260
+
261
+ Primarily, specification is a table with the following fields:
262
+
263
+ - <source> `(string|nil)` - field with URI of plugin source used during creation
264
+ or update. Can be anything allowed by `git clone`.
265
+ Default: `nil` to rely on source set up during install.
266
+ Notes:
267
+ - It is required for creating plugin, but can be omitted afterwards.
268
+ - As the most common case, URI of the format "user/repo" (if it contains
269
+ valid characters) is transformed into "https://github.com/user/repo".
270
+
271
+ - <name> `(string|nil)` - directory basename of where to put plugin source.
272
+ It is put in "pack/deps/opt" subdirectory of `config.path.package`.
273
+ Default: basename of <source> if it is present, otherwise should be
274
+ provided explicitly.
275
+
276
+ - <checkout> `(string|nil)` - checkout target used to set state during update.
277
+ Can be anything supported by `git checkout` - branch, commit, tag, etc.
278
+ Default: `nil` for default branch (usually "main" or "master").
279
+
280
+ - <monitor> `(string|nil)` - monitor branch used to track new changes from
281
+ different target than `checkout`. Should be a name of present Git branch.
282
+ Default: `nil` for default branch (usually "main" or "master").
283
+
284
+ - <depends> `(table|nil)` - array of plugin specifications (strings or tables)
285
+ to be added prior to the target.
286
+ Default: `nil` for no dependencies.
287
+
288
+ - <hooks> `(table|nil)` - table with callable hooks to call on certain events.
289
+ Possible hook names:
290
+ - <pre_install> - before creating plugin directory.
291
+ - <post_install> - after creating plugin directory (before |:packadd|).
292
+ - <pre_checkout> - before making change in existing plugin.
293
+ - <post_checkout> - after making change in existing plugin.
294
+ Each hook is executed with the following table as an argument:
295
+ - <path> (`string`) - absolute path to plugin's directory
296
+ (might not yet exist on disk).
297
+ - <source> (`string`) - resolved <source> from spec.
298
+ - <name> (`string`) - resolved <name> from spec.
299
+ Default: `nil` for no hooks.
300
+
301
+ ------------------------------------------------------------------------------
302
+ *MiniDeps-commands*
303
+ Note: Most commands have a Lua function alternative which they rely on.
304
+ Like |:DepsAdd| uses |MiniDeps.add()|, etc.
305
+
306
+ # :DepsAdd ~
307
+
308
+ *:DepsAdd* with `user/repo` argument makes plugin https://github.com/user/repo
309
+ available in the current session (also creates it, if it is not present).
310
+ `:DepsAdd name` adds already installed plugin `name` to current session.
311
+ Accepts only single string compatible with |MiniDeps-plugin-specification|.
312
+ To add plugin in every session, put |MiniDeps.add()| in |init.lua|.
313
+
314
+ # :DepsUpdate ~
315
+
316
+ *:DepsUpdate* synchronizes plugins with their session specifications and
317
+ updates them with new changes from sources. It shows confirmation buffer in
318
+ a separate |tabpage| with information about an upcoming update to review
319
+ and (selectively) apply. See |MiniDeps.update()| for more info.
320
+
321
+ `:DepsUpdate name` updates plugin `name`. Any number of names is allowed.
322
+
323
+ `:DepsUpdate!` and `:DepsUpdate! name` update without confirmation.
324
+ You can see what was done in the log file afterwards (|:DepsShowLog|).
325
+
326
+ # :DepsUpdateOffline ~
327
+
328
+ *:DepsUpdateOffline* is same as |:DepsUpdate| but doesn't download new updates
329
+ from sources. Useful to only synchronize plugin specification in code and
330
+ on disk without unnecessary downloads.
331
+
332
+ # :DepsShowLog ~
333
+
334
+ *:DepsShowLog* opens log file to review.
335
+
336
+ # :DepsClean ~
337
+
338
+ *:DepsClean* deletes plugins from disk not added to current session. It shows
339
+ confirmation buffer in a separate |tabpage| with information about an upcoming
340
+ deletes to review and (selectively) apply. See |MiniDeps.clean()| for more info.
341
+
342
+ `:DepsClean!` deletes plugins without confirmation.
343
+
344
+ # :DepsSnapSave ~
345
+
346
+ *:DepsSnapSave* creates snapshot file in default location (see |MiniDeps.config|).
347
+ `:DepsSnapSave path` creates snapshot file at `path`.
348
+
349
+ # :DepsSnapLoad ~
350
+
351
+ *:DepsSnapLoad* loads snapshot file from default location (see |MiniDeps.config|).
352
+ `:DepsSnapLoad path` loads snapshot file at `path`.
353
+
354
+ ------------------------------------------------------------------------------
355
+ *MiniDeps.setup()*
356
+ `MiniDeps.setup`({config})
357
+ Module setup
358
+
359
+ Calling this function creates user commands described in |MiniDeps-commands|.
360
+
361
+ Parameters ~
362
+ {config} `(table|nil)` Module config table. See |MiniDeps.config|.
363
+
364
+ Usage ~
365
+ >lua
366
+ require('mini.deps').setup() -- use default config
367
+ -- OR
368
+ require('mini.deps').setup({}) -- replace {} with your config table
369
+ <
370
+ ------------------------------------------------------------------------------
371
+ *MiniDeps.config*
372
+ `MiniDeps.config`
373
+ Defaults ~
374
+ >lua
375
+ MiniDeps.config = {
376
+ -- Parameters of CLI jobs
377
+ job = {
378
+ -- Number of parallel threads to use. Default: 80% of all available.
379
+ n_threads = nil,
380
+
381
+ -- Timeout (in ms) for each job before force quit
382
+ timeout = 30000,
383
+ },
384
+
385
+ -- Paths describing where to store data
386
+ path = {
387
+ -- Directory for built-in package.
388
+ -- All plugins are actually stored in 'pack/deps' subdirectory.
389
+ package = vim.fn.stdpath('data') .. '/site',
390
+
391
+ -- Default file path for a snapshot
392
+ snapshot = vim.fn.stdpath('config') .. '/mini-deps-snap',
393
+
394
+ -- Log file
395
+ log = vim.fn.stdpath('log') .. '/mini-deps.log'
396
+ },
397
+
398
+ -- Whether to disable showing non-error feedback
399
+ silent = false,
400
+ }
401
+ <
402
+ # Job ~
403
+
404
+ `config.job` defines how CLI jobs are run.
405
+
406
+ `job.n_threads` is a maximum number of parallel jobs used when needed.
407
+ Default: 80% of all available.
408
+
409
+ `job.timeout` is a duration (in ms) from job start until it is forced to stop.
410
+ Default: 30000.
411
+
412
+ # Paths ~
413
+
414
+ `config.path` defines main paths used in this module.
415
+
416
+ `path.package` is a string with path inside which "pack/deps" package is stored
417
+ (see |MiniDeps-overview|).
418
+ Default: "site" subdirectory of "data" standard path (see |stdpath()|).
419
+
420
+ `path.snapshot` is a string with default path for snapshot.
421
+ See |:DepsSnapSave| and |:DepsSnapLoad|.
422
+ Default: "mini-deps-snap" file in "config" standard path (see |stdpath()|).
423
+
424
+ `path.log` is a string with path containing log of operations done by module.
425
+ In particular, it contains all changes done after making an update.
426
+ Default: "mini-deps.log" file in "log" standard path (see |stdpath()|).
427
+
428
+ # Silent ~
429
+
430
+ `config.silent` is a boolean controlling whether to suppress non-error feedback.
431
+ Default: `false`.
432
+
433
+ ------------------------------------------------------------------------------
434
+ *MiniDeps.add()*
435
+ `MiniDeps.add`({spec}, {opts})
436
+ Add plugin to current session
437
+
438
+ - Process specification by expanding dependencies into single spec array.
439
+ - Ensure plugin is present on disk along with its dependencies by installing
440
+ (in parallel) absent ones:
441
+ - Execute `opts.hooks.pre_install`.
442
+ - Use `git clone` to clone plugin from its source URI into "pack/deps/opt".
443
+ - Set state according to `opts.checkout`.
444
+ - Execute `opts.hooks.post_install`.
445
+ - Register spec(s) in current session.
446
+ - Make sure plugin(s) can be used in current session (see |:packadd|).
447
+ - If not during startup and is needed, source all "after/plugin/" scripts.
448
+
449
+ Notes:
450
+ - Presence of plugin is checked by its name which is the same as the name
451
+ of its directory inside "pack/deps" package (see |MiniDeps-overview|).
452
+ - To increase performance, this function only ensures presence on disk and
453
+ nothing else. In particular, it doesn't ensure `opts.checkout` state.
454
+ Use |MiniDeps.update()| or |:DepsUpdateOffline| explicitly.
455
+ - Adding plugin several times updates its session specs.
456
+
457
+ Parameters ~
458
+ {spec} `(table|string)` Plugin specification. See |MiniDeps-plugin-specification|.
459
+ {opts} `(table|nil)` Options. Possible fields:
460
+ - <bang> `(boolean)` - whether to use `:packadd!` instead of plain |:packadd|.
461
+
462
+ ------------------------------------------------------------------------------
463
+ *MiniDeps.update()*
464
+ `MiniDeps.update`({names}, {opts})
465
+ Update plugins
466
+
467
+ - Synchronize specs with state of plugins on disk (set `source`, etc.).
468
+ - Infer data before downloading updates.
469
+ - If not offline, download updates (in parallel).
470
+ - Infer data after downloading updates.
471
+ - If update is forced, apply all changes immediately while updating log
472
+ file (at `config.path.log`; use |:DepsShowLog| to review).
473
+ Otherwise show confirmation buffer with instructions on how to proceed.
474
+
475
+ Parameters ~
476
+ {names} `(table|nil)` Array of plugin names to update.
477
+ Default: all plugins from current session (see |MiniDeps.get_session()|).
478
+ {opts} `(table|nil)` Options. Possible fields:
479
+ - <force> `(boolean)` - whether to force update without confirmation.
480
+ Default: `false`.
481
+ - <offline> `(boolean)` - whether to skip downloading updates from sources.
482
+ Default: `false`.
483
+
484
+ ------------------------------------------------------------------------------
485
+ *MiniDeps.clean()*
486
+ `MiniDeps.clean`({opts})
487
+ Clean plugins
488
+
489
+ - Compute absent plugins: not registered in current session
490
+ (see |MiniDeps.get_session()|) but present on disk in dedicated "pack/deps"
491
+ package (inside `config.path.package`).
492
+ - If cleaning is forced, delete all absent plugins from disk.
493
+ Otherwise show confirmation buffer with instructions on how to proceed.
494
+
495
+ Parameters ~
496
+ {opts} `(table|nil)` Options. Possible fields:
497
+ - <force> `(boolean)` - whether to force delete without confirmation.
498
+ Default: `false`.
499
+
500
+ ------------------------------------------------------------------------------
501
+ *MiniDeps.snap_get()*
502
+ `MiniDeps.snap_get`()
503
+ Compute snapshot
504
+
505
+ Return ~
506
+ `(table)` A snapshot table: plugin names as keys and state as values.
507
+ All plugins in current session are processed.
508
+
509
+ ------------------------------------------------------------------------------
510
+ *MiniDeps.snap_set()*
511
+ `MiniDeps.snap_set`({snap})
512
+ Apply snapshot
513
+
514
+ Notes:
515
+ - Checking out states from snapshot does not update session plugin spec
516
+ (`checkout` field in particular). Among others, it means that next call
517
+ to |MiniDeps.update()| might override the result of this function.
518
+ To make changes permanent, set `checkout` spec field to state from snapshot.
519
+
520
+ Parameters ~
521
+ {snap} `(table)` A snapshot table: plugin names as keys and state as values.
522
+ Only plugins in current session are processed.
523
+
524
+ ------------------------------------------------------------------------------
525
+ *MiniDeps.snap_save()*
526
+ `MiniDeps.snap_save`({path})
527
+ Save snapshot
528
+
529
+ Parameters ~
530
+ {path} `(string|nil)` A valid path on disk where to write snapshot computed
531
+ with |MiniDeps.snap_get()|.
532
+ Default: `config.path.snapshot`.
533
+
534
+ ------------------------------------------------------------------------------
535
+ *MiniDeps.snap_load()*
536
+ `MiniDeps.snap_load`({path})
537
+ Load snapshot file
538
+
539
+ Notes from |MiniDeps.snap_set()| also apply here.
540
+
541
+ Parameters ~
542
+ {path} `(string|nil)` A valid path on disk from where to read snapshot.
543
+ Default: `config.path.snapshot`.
544
+
545
+ ------------------------------------------------------------------------------
546
+ *MiniDeps.get_session()*
547
+ `MiniDeps.get_session`()
548
+ Get session
549
+
550
+ Plugin is registered in current session if it either:
551
+ - Was added with |MiniDeps.add()| (preserving order of calls).
552
+ - Is a "start" plugin and present in |'runtimepath'|.
553
+
554
+ Return ~
555
+ `(table)` Array with specifications of all plugins registered in
556
+ current session.
557
+
558
+ ------------------------------------------------------------------------------
559
+ *MiniDeps.now()*
560
+ `MiniDeps.now`({f})
561
+ Execute function now
562
+
563
+ Safely execute function immediately. Errors are shown with |vim.notify()|
564
+ later, after all queued functions (including with |MiniDeps.later()|)
565
+ are executed, thus not blocking execution of next code in file.
566
+
567
+ Assumed to be used as a first step during two-stage config execution to
568
+ load plugins immediately during startup. See |MiniDeps-overview|.
569
+
570
+ Parameters ~
571
+ {f} `(function)` Callable to execute.
572
+
573
+ ------------------------------------------------------------------------------
574
+ *MiniDeps.later()*
575
+ `MiniDeps.later`({f})
576
+ Execute function later
577
+
578
+ Queue function to be safely executed later without blocking execution of
579
+ next code in file. All queued functions are guaranteed to be executed in
580
+ order they were added.
581
+ Errors are shown with |vim.notify()| after all queued functions are executed.
582
+
583
+ Assumed to be used as a second step during two-stage config execution to
584
+ load plugins "lazily" after startup. See |MiniDeps-overview|.
585
+
586
+ Parameters ~
587
+ {f} `(function)` Callable to execute.
588
+
589
+
590
+ vim:tw=78:ts=8:noet:ft=help:norl: