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,937 @@
1
+ *mini.animate* Animate common Neovim actions
2
+
3
+ MIT License Copyright (c) 2022 Evgeni Chasnovski
4
+
5
+ ------------------------------------------------------------------------------
6
+ *MiniAnimate*
7
+ Features:
8
+ - Works out of the box with a single `require('mini.animate').setup()`.
9
+ No extra mappings or commands needed.
10
+
11
+ - Animate cursor movement inside same buffer by showing customizable path.
12
+ See |MiniAnimate.config.cursor| for more details.
13
+
14
+ - Animate scrolling with a series of subscrolls ("smooth scrolling").
15
+ See |MiniAnimate.config.scroll| for more details.
16
+
17
+ - Animate window resize by gradually changing sizes of all windows.
18
+ See |MiniAnimate.config.resize| for more details.
19
+
20
+ - Animate window open/close with visually updating floating window.
21
+ See |MiniAnimate.config.open| and |MiniAnimate.config.close| for more details.
22
+
23
+ - Timings for all actions can be customized independently.
24
+ See |MiniAnimate-timing| for more details.
25
+
26
+ - Action animations can be enabled/disabled independently.
27
+
28
+ - All animations are asynchronous/non-blocking and trigger a targeted event
29
+ which can be used to perform actions after animation is done.
30
+
31
+ - |MiniAnimate.animate()| function which can be used to perform own animations.
32
+
33
+ Notes:
34
+ - Cursor movement is animated inside same window and buffer, not as cursor
35
+ moves across the screen.
36
+
37
+ - Scroll and resize animations are done with "side effects": they actually
38
+ change the state of what is animated (window view and sizes
39
+ respectively). This has a downside of possibly needing extra work to
40
+ account for asynchronous nature of animation (like adjusting certain
41
+ mappings, etc.). See |MiniAnimate.config.scroll| and
42
+ |MiniAnimate.config.resize| for more details.
43
+
44
+ # Setup ~
45
+
46
+ This module needs a setup with `require('mini.animate').setup({})` (replace
47
+ `{}` with your `config` table). It will create global Lua table `MiniAnimate`
48
+ which you can use for scripting or manually (with `:lua MiniAnimate.*`).
49
+
50
+ See |MiniAnimate.config| for available config settings.
51
+
52
+ You can override runtime config settings (like `config.modifiers`) locally
53
+ to buffer inside `vim.b.minianimate_config` which should have same structure
54
+ as `MiniAnimate.config`. See |mini.nvim-buffer-local-config| for more details.
55
+
56
+ # Comparisons ~
57
+
58
+ - [Neovide](https://neovide.dev/):
59
+ - Neovide is a standalone GUI which has more control over its animations.
60
+ While |mini.animate| works inside terminal emulator (with all its
61
+ limitations, like lack of pixel-size control over animations).
62
+ - Neovide animates cursor movement across screen, while |mini.animate| -
63
+ as it moves across same buffer.
64
+ - Neovide has fixed number of animation effects per action, while
65
+ |mini.animate| is fully customizable.
66
+ - |mini.animate| implements animations for window open/close, while
67
+ Neovide does not.
68
+ - [edluffy/specs.nvim](https://github.com/edluffy/specs.nvim):
69
+ - |mini.animate| approaches cursor movement visualization via
70
+ customizable path function (uses extmarks), while `specs.nvim` can
71
+ customize within its own visual effects (shading and floating
72
+ window resizing).
73
+ - [karb94/neoscroll.nvim](https://github.com/karb94/neoscroll.nvim):
74
+ - Scroll animation is triggered only inside dedicated mappings.
75
+ |mini.animate| animates scroll resulting from any window view change.
76
+ - [anuvyklack/windows.nvim](https://github.com/anuvyklack/windows.nvim):
77
+ - Resize animation is done only within custom commands and mappings,
78
+ while |mini.animate| animates any resize with appropriate values of
79
+ |'winheight'| / |'winwidth'| and |'winminheight'| / |'winminwidth'|).
80
+
81
+ # Highlight groups ~
82
+ *MiniAnimate-hl-groups*
83
+
84
+ - `MiniAnimateCursor` - highlight of cursor during its animated movement.
85
+ - `MiniAnimateNormalFloat` - highlight of floating window for `open` and
86
+ `close` animations.
87
+
88
+ To change any highlight group, set it directly with |nvim_set_hl()|.
89
+
90
+ # Disabling ~
91
+
92
+ To disable, set `vim.g.minianimate_disable` (globally) or
93
+ `vim.b.minianimate_disable` (for a buffer) to `true`. Considering high
94
+ number of different scenarios and customization intentions, writing exact
95
+ rules for disabling module's functionality is left to user. See
96
+ |mini.nvim-disabling-recipes| for common recipes.
97
+
98
+ ------------------------------------------------------------------------------
99
+ *MiniAnimate.setup()*
100
+ `MiniAnimate.setup`({config})
101
+ Module setup
102
+
103
+ Parameters ~
104
+ {config} `(table|nil)` Module config table. See |MiniAnimate.config|.
105
+
106
+ Usage ~
107
+ >lua
108
+ require('mini.animate').setup() -- use default config
109
+ -- OR
110
+ require('mini.animate').setup({}) -- replace {} with your config table
111
+ <
112
+ ------------------------------------------------------------------------------
113
+ *MiniAnimate.config*
114
+ `MiniAnimate.config`
115
+ Defaults ~
116
+ >lua
117
+ MiniAnimate.config = {
118
+ -- Cursor path
119
+ cursor = {
120
+ -- Whether to enable this animation
121
+ enable = true,
122
+
123
+ -- Timing of animation (how steps will progress in time)
124
+ timing = --<function: linear animation, total 250ms>,
125
+
126
+ -- Path generator for visualized cursor movement
127
+ path = --<function: implements shortest line path no longer than 1000>,
128
+ },
129
+
130
+ -- Vertical scroll
131
+ scroll = {
132
+ -- Whether to enable this animation
133
+ enable = true,
134
+
135
+ -- Timing of animation (how steps will progress in time)
136
+ timing = --<function: linear animation, total 250ms>,
137
+
138
+ -- Subscroll generator based on total scroll
139
+ subscroll = --<function: implements equal scroll with at most 60 steps>,
140
+ },
141
+
142
+ -- Window resize
143
+ resize = {
144
+ -- Whether to enable this animation
145
+ enable = true,
146
+
147
+ -- Timing of animation (how steps will progress in time)
148
+ timing = --<function: linear animation, total 250ms>,
149
+
150
+ -- Subresize generator for all steps of resize animations
151
+ subresize = --<function: implements equal linear steps>,
152
+ },
153
+
154
+ -- Window open
155
+ open = {
156
+ -- Whether to enable this animation
157
+ enable = true,
158
+
159
+ -- Timing of animation (how steps will progress in time)
160
+ timing = --<function: linear animation, total 250ms>,
161
+
162
+ -- Floating window config generator visualizing specific window
163
+ winconfig = --<function: implements static window for 25 steps>,
164
+
165
+ -- 'winblend' (window transparency) generator for floating window
166
+ winblend = --<function: implements equal linear steps from 80 to 100>,
167
+ },
168
+
169
+ -- Window close
170
+ close = {
171
+ -- Whether to enable this animation
172
+ enable = true,
173
+
174
+ -- Timing of animation (how steps will progress in time)
175
+ timing = --<function: linear animation, total 250ms>,
176
+
177
+ -- Floating window config generator visualizing specific window
178
+ winconfig = --<function: implements static window for 25 steps>,
179
+
180
+ -- 'winblend' (window transparency) generator for floating window
181
+ winblend = --<function: implements equal linear steps from 80 to 100>,
182
+ },
183
+ }
184
+ <
185
+ # General ~
186
+
187
+ - *MiniAnimate-timing* Every animation is a non-blockingly scheduled series of
188
+ specific actions. They are executed in a sequence of timed steps controlled
189
+ by `timing` option. It is a callable which, given next and total step numbers,
190
+ returns wait time (in ms).
191
+ See |MiniAnimate.gen_timing| for builtin timing functions.
192
+ See |MiniAnimate.animate()| for more details about animation process.
193
+
194
+ - Every animation can be enabled/disabled independently by setting `enable`
195
+ option to `true`/`false`.
196
+
197
+ - *MiniAnimate-done-event* Every animation triggers custom |User| event when it
198
+ is finished. It is named `MiniAnimateDoneXxx` with `Xxx` replaced by capitalized
199
+ supported animation action name (like `MiniAnimateDoneCursor`). Use it to
200
+ schedule some action after certain animation is completed. Alternatively,
201
+ you can use |MiniAnimate.execute_after()| (usually preferred in mappings).
202
+
203
+ - Each animation has its main step generator which defines how particular
204
+ animation is done. They all are callables which take some input data and
205
+ return an array of step data. Length of that array determines number of
206
+ animation steps. Outputs `nil` and empty table result in no animation.
207
+
208
+ # Cursor ~
209
+ *MiniAnimate.config.cursor*
210
+
211
+ This animation is triggered for each movement of cursor inside same window
212
+ and buffer. Its visualization step consists from placing single extmark (see
213
+ |extmarks|) at certain position. This extmark contains single space and is
214
+ highlighted with `MiniAnimateCursor` highlight group.
215
+
216
+ Exact places of extmark and their number is controlled by `path` option. It
217
+ is a callable which takes `destination` argument (2d integer point in
218
+ `(line, col)` coordinates) and returns array of relative to `(0, 0)` places
219
+ for extmark to be placed. Example:
220
+ - Input `(2, -3)` means cursor jumped 2 lines forward and 3 columns backward.
221
+ - Output `{ {0, 0 }, { 0, -1 }, { 0, -2 }, { 0, -3 }, { 1, -3 } }` means
222
+ that path is first visualized along the initial line and then along final
223
+ column.
224
+
225
+ See |MiniAnimate.gen_path| for builtin path generators.
226
+
227
+ Notes:
228
+ - Input `destination` value is computed ignoring folds. This is by design
229
+ as it helps better visualize distance between two cursor positions.
230
+ - Outputs of path generator resulting in a place where extmark can't be
231
+ placed are silently omitted during animation: this step won't show any
232
+ visualization.
233
+
234
+ Configuration example: >lua
235
+
236
+ local animate = require('mini.animate')
237
+ animate.setup({
238
+ cursor = {
239
+ -- Animate for 200 milliseconds with linear easing
240
+ timing = animate.gen_timing.linear({ duration = 200, unit = 'total' }),
241
+
242
+ -- Animate with shortest line for any cursor move
243
+ path = animate.gen_path.line({
244
+ predicate = function() return true end,
245
+ }),
246
+ }
247
+ })
248
+ <
249
+ After animation is done, `MiniAnimateDoneCursor` event is triggered.
250
+
251
+ # Scroll ~
252
+ *MiniAnimate.config.scroll*
253
+
254
+ This animation is triggered for each vertical scroll of current window.
255
+ Its visualization step consists from performing a small subscroll which all
256
+ in total will result into needed total scroll.
257
+
258
+ Exact subscroll values and their number is controlled by `subscroll` option.
259
+ It is a callable which takes `total_scroll` argument (single non-negative
260
+ integer) and returns array of non-negative integers each representing the
261
+ amount of lines needed to be scrolled inside corresponding step. All
262
+ subscroll values should sum to input `total_scroll`.
263
+ Example:
264
+ - Input `5` means that total scroll consists from 5 lines (either up or down,
265
+ which doesn't matter).
266
+ - Output of `{ 1, 1, 1, 1, 1 }` means that there are 5 equal subscrolls.
267
+
268
+ See |MiniAnimate.gen_subscroll| for builtin subscroll generators.
269
+
270
+ Notes:
271
+ - Input value of `total_scroll` is computed taking folds into account.
272
+ - As scroll animation is essentially a precisely scheduled non-blocking
273
+ subscrolls, this has two important interconnected consequences:
274
+ - If another scroll is attempted during the animation, it is done based
275
+ on the CURRENTLY VISIBLE window view. Example: if user presses |CTRL-D|
276
+ and then |CTRL-U| when animation is half done, window will not display
277
+ the previous view half of |'scroll'| above it. This especially affects
278
+ mouse wheel scrolling, as each its turn results in a new scroll for
279
+ number of lines defined by |'mousescroll'|. Tweak it to your liking.
280
+ - It breaks the use of several relative scrolling commands in the same
281
+ command. Use |MiniAnimate.execute_after()| to schedule action after
282
+ reaching target window view.
283
+ Example: a useful `nnoremap n nzvzz` mapping (consecutive application
284
+ of |n|, |zv|, and |zz|) should be expressed in the following way: >lua
285
+
286
+ '<Cmd>lua vim.cmd("normal! n"); ' ..
287
+ 'MiniAnimate.execute_after("scroll", "normal! zvzz")<CR>'
288
+ <
289
+ - Default timing might conflict with scrolling via holding a key (like `j` or `k`
290
+ with |'wrap'| enabled) due to high key repeat rate: next scroll is done before
291
+ first step of current one finishes. Resolve this by not scrolling like that
292
+ or by ensuring maximum value of step duration to be lower than between
293
+ repeated keys: set timing like `function(_, n) return math.min(250/n, 10) end`
294
+ or use timing with constant step duration.
295
+
296
+ Configuration example: >lua
297
+
298
+ local animate = require('mini.animate')
299
+ animate.setup({
300
+ scroll = {
301
+ -- Animate for 200 milliseconds with linear easing
302
+ timing = animate.gen_timing.linear({ duration = 200, unit = 'total' }),
303
+
304
+ -- Animate equally but with at most 120 steps instead of default 60
305
+ subscroll = animate.gen_subscroll.equal({ max_output_steps = 120 }),
306
+ }
307
+ })
308
+ <
309
+ After animation is done, `MiniAnimateDoneScroll` event is triggered.
310
+
311
+ # Resize ~
312
+ *MiniAnimate.config.resize*
313
+
314
+ This animation is triggered for window resize while having same layout of
315
+ same windows. For example, it won't trigger when window is opened/closed or
316
+ after something like |CTRL-W_K|. Its visualization step consists from setting
317
+ certain sizes to all visible windows (last step being for "true" final sizes).
318
+
319
+ Exact window step sizes and their number is controlled by `subresize` option.
320
+ It is a callable which takes `sizes_from` and `sizes_to` arguments (both
321
+ tables with window id as keys and dimension table as values) and returns
322
+ array of same shaped data.
323
+ Example:
324
+ - Input: >lua
325
+
326
+ -- First
327
+ { [1000] = {width = 7, height = 5}, [1001] = {width = 7, height = 10} }
328
+ -- Second
329
+ { [1000] = {width = 9, height = 5}, [1001] = {width = 5, height = 10} }
330
+ -- Means window 1000 increased its width by 2 in expense of window 1001
331
+ <
332
+ - The following output demonstrates equal resizing: >lua
333
+
334
+ {
335
+ { [1000] = {width = 8, height = 5}, [1001] = {width = 6, height = 10} },
336
+ { [1000] = {width = 9, height = 5}, [1001] = {width = 5, height = 10} },
337
+ }
338
+ <
339
+ See |MiniAnimate.gen_subresize| for builtin subresize generators.
340
+
341
+ Notes:
342
+
343
+ - As resize animation is essentially a precisely scheduled non-blocking
344
+ subresizes, this has two important interconnected consequences:
345
+ - If another resize is attempted during the animation, it is done based
346
+ on the CURRENTLY VISIBLE window sizes. This might affect relative
347
+ resizing.
348
+ - It breaks the use of several relative resizing commands in the same
349
+ command. Use |MiniAnimate.execute_after()| to schedule action after
350
+ reaching target window sizes.
351
+
352
+ Configuration example: >lua
353
+
354
+ local is_many_wins = function(sizes_from, sizes_to)
355
+ return vim.tbl_count(sizes_from) >= 3
356
+ end
357
+ local animate = require('mini.animate')
358
+ animate.setup({
359
+ resize = {
360
+ -- Animate for 200 milliseconds with linear easing
361
+ timing = animate.gen_timing.linear({ duration = 200, unit = 'total' }),
362
+
363
+ -- Animate only if there are at least 3 windows
364
+ subresize = animate.gen_subscroll.equal({ predicate = is_many_wins }),
365
+ }
366
+ })
367
+ <
368
+ After animation is done, `MiniAnimateDoneResize` event is triggered.
369
+
370
+ # Window open/close ~
371
+ *MiniAnimate.config.open*
372
+ *MiniAnimate.config.close*
373
+
374
+ These animations are similarly triggered for regular (non-floating) window
375
+ open/close. Their visualization step consists from drawing empty floating
376
+ window with customizable config and transparency.
377
+
378
+ Exact window visualization characteristics are controlled by `winconfig`
379
+ and `winblend` options.
380
+
381
+ The `winconfig` option is a callable which takes window id (|window-ID|) as
382
+ input and returns an array of floating window configs (as in `config`
383
+ argument of |nvim_open_win()|). Its length determines number of animation steps.
384
+ Example:
385
+ - The following output results into two animation steps with second being
386
+ upper left quarter of a first: >lua
387
+
388
+ {
389
+ {
390
+ row = 0, col = 0,
391
+ width = 10, height = 10,
392
+ relative = 'editor', anchor = 'NW', focusable = false,
393
+ zindex = 1, border = 'none', style = 'minimal',
394
+ },
395
+ {
396
+ row = 0, col = 0,
397
+ width = 5, height = 5,
398
+ relative = 'editor', anchor = 'NW', focusable = false,
399
+ zindex = 1, border = 'none', style = 'minimal',
400
+ },
401
+ }
402
+ <
403
+ The `winblend` option is similar to `timing` option: it is a callable
404
+ which, given current and total step numbers, returns value of floating
405
+ window's |'winblend'| option. Note, that it is called for current step (so
406
+ starts from 0), as opposed to `timing` which is called before step.
407
+ Example:
408
+ - Function `function(s, n) return 80 + 20 * s / n end` results in linear
409
+ transition from `winblend` value of 80 to 100.
410
+
411
+ See |MiniAnimate.gen_winconfig| for builtin window config generators.
412
+ See |MiniAnimate.gen_winblend| for builtin window transparency generators.
413
+
414
+ Configuration example: >lua
415
+
416
+ local animate = require('mini.animate')
417
+ animate.setup({
418
+ open = {
419
+ -- Animate for 400 milliseconds with linear easing
420
+ timing = animate.gen_timing.linear({ duration = 400, unit = 'total' }),
421
+
422
+ -- Animate with wiping from nearest edge instead of default static one
423
+ winconfig = animate.gen_winconfig.wipe({ direction = 'from_edge' }),
424
+
425
+ -- Make bigger windows more transparent
426
+ winblend = animate.gen_winblend.linear({ from = 80, to = 100 }),
427
+ },
428
+
429
+ close = {
430
+ -- Animate for 400 milliseconds with linear easing
431
+ timing = animate.gen_timing.linear({ duration = 400, unit = 'total' }),
432
+
433
+ -- Animate with wiping to nearest edge instead of default static one
434
+ winconfig = animate.gen_winconfig.wipe({ direction = 'to_edge' }),
435
+
436
+ -- Make bigger windows more transparent
437
+ winblend = animate.gen_winblend.linear({ from = 100, to = 80 }),
438
+ },
439
+ })
440
+ <
441
+ After animation is done, `MiniAnimateDoneOpen` or `MiniAnimateDoneClose`
442
+ event is triggered for `open` and `close` animation respectively.
443
+
444
+ ------------------------------------------------------------------------------
445
+ *MiniAnimate.is_active()*
446
+ `MiniAnimate.is_active`({animation_type})
447
+ Check animation activity
448
+
449
+ Parameters ~
450
+ {animation_type} `(string)` One of supported animation types
451
+ (entries of |MiniAnimate.config|, like `'cursor'`, etc.).
452
+
453
+ Return ~
454
+ `(boolean)` Whether the animation is currently active.
455
+
456
+ ------------------------------------------------------------------------------
457
+ *MiniAnimate.execute_after()*
458
+ `MiniAnimate.execute_after`({animation_type}, {action})
459
+ Execute action after some animation is done
460
+
461
+ Execute action immediately if animation is not active (checked with
462
+ |MiniAnimate.is_active()|). Else, schedule its execution until after
463
+ animation is done (on corresponding "done event", see
464
+ |MiniAnimate-done-event|).
465
+
466
+ Mostly meant to be used inside mappings.
467
+
468
+ Example:
469
+
470
+ A useful `nnoremap n nzvzz` mapping (consecutive application of |n|, |zv|, and |zz|)
471
+ should be expressed in the following way: >lua
472
+
473
+ '<Cmd>lua vim.cmd("normal! n"); ' ..
474
+ 'MiniAnimate.execute_after("scroll", "normal! zvzz")<CR>'
475
+ <
476
+ Parameters ~
477
+ {animation_type} `(string)` One of supported animation types
478
+ (as in |MiniAnimate.is_active()|).
479
+ {action} `(string|function)` Action to be executed. If string, executed as
480
+ command (via |vim.cmd()|).
481
+
482
+ ------------------------------------------------------------------------------
483
+ *MiniAnimate.animate()*
484
+ `MiniAnimate.animate`({step_action}, {step_timing}, {opts})
485
+ Animate action
486
+
487
+ This is equivalent to asynchronous execution of the following algorithm:
488
+ - Call `step_action(0)` immediately after calling this function. Stop if
489
+ action returned `false` or `nil`.
490
+ - Wait `step_timing(1)` milliseconds.
491
+ - Call `step_action(1)`. Stop if it returned `false` or `nil`.
492
+ - Wait `step_timing(2)` milliseconds.
493
+ - Call `step_action(2)`. Stop if it returned `false` or `nil`.
494
+ - ...
495
+
496
+ Notes:
497
+ - Animation is also stopped on action error or if maximum number of steps
498
+ is reached.
499
+ - Asynchronous execution is done with |uv.new_timer()|. It only allows
500
+ integer parts as repeat value. This has several implications:
501
+ - Outputs of `step_timing()` are accumulated in order to preserve total
502
+ execution time.
503
+ - Any wait time less than 1 ms means that action will be executed
504
+ immediately.
505
+
506
+ Parameters ~
507
+ {step_action} `(function|table)` Callable which takes `step` (integer 0, 1, 2,
508
+ etc. indicating current step) and executes some action. Its return value
509
+ defines when animation should stop: values `false` and `nil` (equivalent
510
+ to no explicit return) stop animation timer; any other continues it.
511
+ {step_timing} `(function|table)` Callable which takes `step` (integer 1, 2, etc.
512
+ indicating next step) and returns how many milliseconds to wait before
513
+ executing this step action.
514
+ {opts} `(table|nil)` Options. Possible fields:
515
+ - <max_steps> - Maximum value of allowed step to execute. Default: 10000000.
516
+
517
+ ------------------------------------------------------------------------------
518
+ *MiniAnimate.gen_timing*
519
+ `MiniAnimate.gen_timing`
520
+ Generate animation timing
521
+
522
+ Each field corresponds to one family of progression which can be customized
523
+ further by supplying appropriate arguments.
524
+
525
+ This is a table with function elements. Call to actually get timing function.
526
+
527
+ Example: >lua
528
+
529
+ local animate = require('mini.animate')
530
+ animate.setup({
531
+ cursor = {
532
+ timing = animate.gen_timing.linear({ duration = 100, unit = 'total' })
533
+ },
534
+ })
535
+ <
536
+ See also ~
537
+ |MiniIndentscope.gen_animation| for similar concept in |mini.indentscope|.
538
+
539
+ ------------------------------------------------------------------------------
540
+ *MiniAnimate.gen_timing.none()*
541
+ `MiniAnimate.gen_timing.none`()
542
+ Generate timing with no animation
543
+
544
+ Show final result immediately. Usually better to use `enable` field in `config`
545
+ if you want to disable animation.
546
+
547
+ ------------------------------------------------------------------------------
548
+ *MiniAnimate.gen_timing.linear()*
549
+ `MiniAnimate.gen_timing.linear`({opts})
550
+ Generate timing with linear progression
551
+
552
+ Parameters ~
553
+ {opts} `(table|nil)` Options that control progression. Possible keys:
554
+ - <easing> `(string)` - a subtype of progression. One of "in"
555
+ (accelerating from zero speed), "out" (decelerating to zero speed),
556
+ "in-out" (default; accelerating halfway, decelerating after).
557
+ - <duration> `(number)` - duration (in ms) of a unit. Default: 20.
558
+ - <unit> `(string)` - which unit's duration `opts.duration` controls. One
559
+ of "step" (default; ensures average duration of step to be `opts.duration`)
560
+ or "total" (ensures fixed total duration regardless of scope's range).
561
+
562
+ Return ~
563
+ `(function)` Timing function (see |MiniAnimate-timing|).
564
+
565
+ ------------------------------------------------------------------------------
566
+ *MiniAnimate.gen_timing.quadratic()*
567
+ `MiniAnimate.gen_timing.quadratic`({opts})
568
+ Generate timing with quadratic progression
569
+
570
+ Parameters ~
571
+ {opts} `(table|nil)` Options that control progression. Possible keys:
572
+ - <easing> `(string)` - a subtype of progression. One of "in"
573
+ (accelerating from zero speed), "out" (decelerating to zero speed),
574
+ "in-out" (default; accelerating halfway, decelerating after).
575
+ - <duration> `(number)` - duration (in ms) of a unit. Default: 20.
576
+ - <unit> `(string)` - which unit's duration `opts.duration` controls. One
577
+ of "step" (default; ensures average duration of step to be `opts.duration`)
578
+ or "total" (ensures fixed total duration regardless of scope's range).
579
+
580
+ Return ~
581
+ `(function)` Timing function (see |MiniAnimate-timing|).
582
+
583
+ ------------------------------------------------------------------------------
584
+ *MiniAnimate.gen_timing.cubic()*
585
+ `MiniAnimate.gen_timing.cubic`({opts})
586
+ Generate timing with cubic progression
587
+
588
+ Parameters ~
589
+ {opts} `(table|nil)` Options that control progression. Possible keys:
590
+ - <easing> `(string)` - a subtype of progression. One of "in"
591
+ (accelerating from zero speed), "out" (decelerating to zero speed),
592
+ "in-out" (default; accelerating halfway, decelerating after).
593
+ - <duration> `(number)` - duration (in ms) of a unit. Default: 20.
594
+ - <unit> `(string)` - which unit's duration `opts.duration` controls. One
595
+ of "step" (default; ensures average duration of step to be `opts.duration`)
596
+ or "total" (ensures fixed total duration regardless of scope's range).
597
+
598
+ Return ~
599
+ `(function)` Timing function (see |MiniAnimate-timing|).
600
+
601
+ ------------------------------------------------------------------------------
602
+ *MiniAnimate.gen_timing.quartic()*
603
+ `MiniAnimate.gen_timing.quartic`({opts})
604
+ Generate timing with quartic progression
605
+
606
+ Parameters ~
607
+ {opts} `(table|nil)` Options that control progression. Possible keys:
608
+ - <easing> `(string)` - a subtype of progression. One of "in"
609
+ (accelerating from zero speed), "out" (decelerating to zero speed),
610
+ "in-out" (default; accelerating halfway, decelerating after).
611
+ - <duration> `(number)` - duration (in ms) of a unit. Default: 20.
612
+ - <unit> `(string)` - which unit's duration `opts.duration` controls. One
613
+ of "step" (default; ensures average duration of step to be `opts.duration`)
614
+ or "total" (ensures fixed total duration regardless of scope's range).
615
+
616
+ Return ~
617
+ `(function)` Timing function (see |MiniAnimate-timing|).
618
+
619
+ ------------------------------------------------------------------------------
620
+ *MiniAnimate.gen_timing.exponential()*
621
+ `MiniAnimate.gen_timing.exponential`({opts})
622
+ Generate timing with exponential progression
623
+
624
+ Parameters ~
625
+ {opts} `(table|nil)` Options that control progression. Possible keys:
626
+ - <easing> `(string)` - a subtype of progression. One of "in"
627
+ (accelerating from zero speed), "out" (decelerating to zero speed),
628
+ "in-out" (default; accelerating halfway, decelerating after).
629
+ - <duration> `(number)` - duration (in ms) of a unit. Default: 20.
630
+ - <unit> `(string)` - which unit's duration `opts.duration` controls. One
631
+ of "step" (default; ensures average duration of step to be `opts.duration`)
632
+ or "total" (ensures fixed total duration regardless of scope's range).
633
+
634
+ Return ~
635
+ `(function)` Timing function (see |MiniAnimate-timing|).
636
+
637
+ ------------------------------------------------------------------------------
638
+ *MiniAnimate.gen_path*
639
+ `MiniAnimate.gen_path`
640
+ Generate cursor animation path
641
+
642
+ For more information see |MiniAnimate.config.cursor|.
643
+
644
+ This is a table with function elements. Call to actually get generator.
645
+
646
+ Example: >lua
647
+
648
+ local animate = require('mini.animate')
649
+ animate.setup({
650
+ cursor = {
651
+ -- Animate with line-column angle instead of shortest line
652
+ path = animate.gen_path.angle(),
653
+ }
654
+ })
655
+ <
656
+ ------------------------------------------------------------------------------
657
+ *MiniAnimate.gen_path.line()*
658
+ `MiniAnimate.gen_path.line`({opts})
659
+ Generate path as shortest line
660
+
661
+ Parameters ~
662
+ {opts} `(table|nil)` Options that control generator. Possible keys:
663
+ - <predicate> `(function)` - a callable which takes `destination` as input and
664
+ returns boolean value indicating whether animation should be done.
665
+ Default: `false` if `destination` is within one line of origin (reduces
666
+ flickering), `true` otherwise.
667
+ - <max_output_steps> `(number)` - maximum number of steps in output.
668
+ Default: 1000.
669
+
670
+ Return ~
671
+ `(function)` Path function (see |MiniAnimate.config.cursor|).
672
+
673
+ ------------------------------------------------------------------------------
674
+ *MiniAnimate.gen_path.angle()*
675
+ `MiniAnimate.gen_path.angle`({opts})
676
+ Generate path as line/column angle
677
+
678
+ Parameters ~
679
+ {opts} `(table|nil)` Options that control generator. Possible keys:
680
+ - <predicate> `(function)` - a callable which takes `destination` as input and
681
+ returns boolean value indicating whether animation should be done.
682
+ Default: `false` if `destination` is within one line of origin (reduces
683
+ flickering), `true` otherwise.
684
+ - <max_output_steps> `(number)` - maximum number of steps per side in output.
685
+ Default: 1000.
686
+ - <first_direction> `(string)` - one of `"horizontal"` (default; animates
687
+ across initial line first) or `"vertical"` (animates across initial
688
+ column first).
689
+
690
+ Return ~
691
+ `(function)` Path function (see |MiniAnimate.config.cursor|).
692
+
693
+ ------------------------------------------------------------------------------
694
+ *MiniAnimate.gen_path.walls()*
695
+ `MiniAnimate.gen_path.walls`({opts})
696
+ Generate path as closing walls at final position
697
+
698
+ Parameters ~
699
+ {opts} `(table|nil)` Options that control generator. Possible keys:
700
+ - <predicate> `(function)` - a callable which takes `destination` as input and
701
+ returns boolean value indicating whether animation should be done.
702
+ Default: `false` if `destination` is within one line of origin (reduces
703
+ flickering), `true` otherwise.
704
+ - <width> `(number)` - initial width of left and right walls. Default: 10.
705
+
706
+ Return ~
707
+ `(function)` Path function (see |MiniAnimate.config.cursor|).
708
+
709
+ ------------------------------------------------------------------------------
710
+ *MiniAnimate.gen_path.spiral()*
711
+ `MiniAnimate.gen_path.spiral`({opts})
712
+ Generate path as diminishing spiral at final position
713
+
714
+ Parameters ~
715
+ {opts} `(table|nil)` Options that control generator. Possible keys:
716
+ - <predicate> `(function)` - a callable which takes `destination` as input and
717
+ returns boolean value indicating whether animation should be done.
718
+ Default: `false` if `destination` is within one line of origin (reduces
719
+ flickering), `true` otherwise.
720
+ - <width> `(number)` - initial width of spiral. Default: 2.
721
+
722
+ Return ~
723
+ `(function)` Path function (see |MiniAnimate.config.cursor|).
724
+
725
+ ------------------------------------------------------------------------------
726
+ *MiniAnimate.gen_subscroll*
727
+ `MiniAnimate.gen_subscroll`
728
+ Generate scroll animation subscroll
729
+
730
+ For more information see |MiniAnimate.config.scroll|.
731
+
732
+ This is a table with function elements. Call to actually get generator.
733
+
734
+ Example: >lua
735
+
736
+ local animate = require('mini.animate')
737
+ animate.setup({
738
+ scroll = {
739
+ -- Animate equally but with 120 maximum steps instead of default 60
740
+ subscroll = animate.gen_subscroll.equal({ max_output_steps = 120 }),
741
+ }
742
+ })
743
+ <
744
+ ------------------------------------------------------------------------------
745
+ *MiniAnimate.gen_subscroll.equal()*
746
+ `MiniAnimate.gen_subscroll.equal`({opts})
747
+ Generate subscroll with equal steps
748
+
749
+ Parameters ~
750
+ {opts} `(table|nil)` Options that control generator. Possible keys:
751
+ - <predicate> `(function)` - a callable which takes `total_scroll` as
752
+ input and returns boolean value indicating whether animation should be
753
+ done. Default: `false` if `total_scroll` is 1 or less (reduces
754
+ unnecessary waiting), `true` otherwise.
755
+ - <max_output_steps> `(number)` - maximum number of subscroll steps in output.
756
+ Adjust this to reduce computations in expense of reduced smoothness.
757
+ Default: 60.
758
+
759
+ Return ~
760
+ `(function)` Subscroll function (see |MiniAnimate.config.scroll|).
761
+
762
+ ------------------------------------------------------------------------------
763
+ *MiniAnimate.gen_subresize*
764
+ `MiniAnimate.gen_subresize`
765
+ Generate resize animation subresize
766
+
767
+ For more information see |MiniAnimate.config.resize|.
768
+
769
+ This is a table with function elements. Call to actually get generator.
770
+
771
+ Example: >lua
772
+
773
+ local is_many_wins = function(sizes_from, sizes_to)
774
+ return vim.tbl_count(sizes_from) >= 3
775
+ end
776
+ local animate = require('mini.animate')
777
+ animate.setup({
778
+ resize = {
779
+ -- Animate only if there are at least 3 windows
780
+ subresize = animate.gen_subresize.equal({ predicate = is_many_wins }),
781
+ }
782
+ })
783
+ <
784
+ ------------------------------------------------------------------------------
785
+ *MiniAnimate.gen_subresize.equal()*
786
+ `MiniAnimate.gen_subresize.equal`({opts})
787
+ Generate subresize with equal steps
788
+
789
+ Parameters ~
790
+ {opts} `(table|nil)` Options that control generator. Possible keys:
791
+ - <predicate> `(function)` - a callable which takes `sizes_from` and
792
+ `sizes_to` as input and returns boolean value indicating whether
793
+ animation should be done. Default: always `true`.
794
+
795
+ Return ~
796
+ `(function)` Subresize function (see |MiniAnimate.config.resize|).
797
+
798
+ ------------------------------------------------------------------------------
799
+ *MiniAnimate.gen_winconfig*
800
+ `MiniAnimate.gen_winconfig`
801
+ Generate open/close animation winconfig
802
+
803
+ For more information see |MiniAnimate.config.open| or |MiniAnimate.config.close|.
804
+
805
+ This is a table with function elements. Call to actually get generator.
806
+
807
+ Example: >lua
808
+
809
+ local is_not_single_window = function(win_id)
810
+ local tabpage_id = vim.api.nvim_win_get_tabpage(win_id)
811
+ return #vim.api.nvim_tabpage_list_wins(tabpage_id) > 1
812
+ end
813
+ local animate = require('mini.animate')
814
+ animate.setup({
815
+ open = {
816
+ -- Animate with wiping from nearest edge instead of default static one
817
+ -- and only if it is not a single window in tabpage
818
+ winconfig = animate.gen_winconfig.wipe({
819
+ predicate = is_not_single_window,
820
+ direction = 'from_edge',
821
+ }),
822
+ },
823
+ close = {
824
+ -- Animate with wiping to nearest edge instead of default static one
825
+ -- and only if it is not a single window in tabpage
826
+ winconfig = animate.gen_winconfig.wipe({
827
+ predicate = is_not_single_window,
828
+ direction = 'to_edge',
829
+ }),
830
+ },
831
+ })
832
+ <
833
+ ------------------------------------------------------------------------------
834
+ *MiniAnimate.gen_winconfig.static()*
835
+ `MiniAnimate.gen_winconfig.static`({opts})
836
+ Generate winconfig for static floating window
837
+
838
+ This will result into floating window statically covering whole target
839
+ window.
840
+
841
+ Parameters ~
842
+ {opts} `(table|nil)` Options that control generator. Possible keys:
843
+ - <predicate> `(function)` - a callable which takes `win_id` as input and
844
+ returns boolean value indicating whether animation should be done.
845
+ Default: always `true`.
846
+ - <n_steps> `(number)` - number of output steps, all with same config.
847
+ Useful to tweak smoothness of transparency animation (done inside
848
+ `winblend` config option). Default: 25.
849
+
850
+ Return ~
851
+ `(function)` Winconfig function (see |MiniAnimate.config.open|
852
+ or |MiniAnimate.config.close|).
853
+
854
+ ------------------------------------------------------------------------------
855
+ *MiniAnimate.gen_winconfig.center()*
856
+ `MiniAnimate.gen_winconfig.center`({opts})
857
+ Generate winconfig for center-focused animated floating window
858
+
859
+ This will result into floating window growing from or shrinking to the
860
+ target window center.
861
+
862
+ Parameters ~
863
+ {opts} `(table|nil)` Options that control generator. Possible keys:
864
+ - <predicate> `(function)` - a callable which takes `win_id` as input and
865
+ returns boolean value indicating whether animation should be done.
866
+ Default: always `true`.
867
+ - <direction> `(string)` - one of `"to_center"` (default; window will
868
+ shrink from full coverage to center) or `"from_center"` (window will
869
+ grow from center to full coverage).
870
+
871
+ Return ~
872
+ `(function)` Winconfig function (see |MiniAnimate.config.open|
873
+ or |MiniAnimate.config.close|).
874
+
875
+ ------------------------------------------------------------------------------
876
+ *MiniAnimate.gen_winconfig.wipe()*
877
+ `MiniAnimate.gen_winconfig.wipe`({opts})
878
+ Generate winconfig for wiping animated floating window
879
+
880
+ This will result into floating window growing from or shrinking to the
881
+ nearest edge. This also takes into account the split type of target window:
882
+ vertically split window will progress towards vertical edge; horizontally -
883
+ towards horizontal.
884
+
885
+ Parameters ~
886
+ {opts} `(table|nil)` Options that control generator. Possible keys:
887
+ - <predicate> `(function)` - a callable which takes `win_id` as input and
888
+ returns boolean value indicating whether animation should be done.
889
+ Default: always `true`.
890
+ - <direction> `(string)` - one of `"to_edge"` (default; window will
891
+ shrink from full coverage to nearest edge) or `"from_edge"` (window
892
+ will grow from edge to full coverage).
893
+
894
+ Return ~
895
+ `(function)` Winconfig function (see |MiniAnimate.config.open|
896
+ or |MiniAnimate.config.close|).
897
+
898
+ ------------------------------------------------------------------------------
899
+ *MiniAnimate.gen_winblend*
900
+ `MiniAnimate.gen_winblend`
901
+ Generate open/close animation `winblend` progression
902
+
903
+ For more information see |MiniAnimate.config.open| or |MiniAnimate.config.close|.
904
+
905
+ This is a table with function elements. Call to actually get transparency
906
+ function.
907
+
908
+ Example: >lua
909
+
910
+ local animate = require('mini.animate')
911
+ animate.setup({
912
+ open = {
913
+ -- Change transparency from 60 to 80 instead of default 80 to 100
914
+ winblend = animate.gen_winblend.linear({ from = 60, to = 80 }),
915
+ },
916
+ close = {
917
+ -- Change transparency from 60 to 80 instead of default 80 to 100
918
+ winblend = animate.gen_winblend.linear({ from = 60, to = 80 }),
919
+ },
920
+ })
921
+ <
922
+ ------------------------------------------------------------------------------
923
+ *MiniAnimate.gen_winblend.linear()*
924
+ `MiniAnimate.gen_winblend.linear`({opts})
925
+ Generate linear `winblend` progression
926
+
927
+ Parameters ~
928
+ {opts} `(table|nil)` Options that control generator. Possible keys:
929
+ - <from> `(number)` - initial value of |'winblend'|.
930
+ - <to> `(number)` - final value of |'winblend'|.
931
+
932
+ Return ~
933
+ `(function)` Winblend function (see |MiniAnimate.config.open|
934
+ or |MiniAnimate.config.close|).
935
+
936
+
937
+ vim:tw=78:ts=8:noet:ft=help:norl: