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,289 @@
1
+ <p align="center"> <img src="https://github.com/nvim-mini/assets/blob/main/logo-2/logo-diff_readme.png?raw=true" alt="mini.diff" style="max-width:100%;border:solid 2px"/> </p>
2
+
3
+ ### Work with diff hunks
4
+
5
+ See more details in [Features](#features) and [Documentation](../doc/mini-diff.txt).
6
+
7
+ ---
8
+
9
+ > [!NOTE]
10
+ > This was previously hosted at a personal `echasnovski` GitHub account. It was transferred to a dedicated organization to improve long term project stability. See more details [here](https://github.com/nvim-mini/mini.nvim/discussions/1970).
11
+
12
+ ⦿ This is a part of [mini.nvim](https://nvim-mini.org/mini.nvim) library. Please use [this link](https://nvim-mini.org/mini.nvim/readmes/mini-diff) if you want to mention this module.
13
+
14
+ ⦿ All contributions (issues, pull requests, discussions, etc.) are done inside of 'mini.nvim'.
15
+
16
+ ⦿ See [whole library documentation](https://nvim-mini.org/mini.nvim/doc/mini-nvim) to learn about general design principles, disable/configuration recipes, and more.
17
+
18
+ ⦿ See [MiniMax](https://nvim-mini.org/MiniMax) for a full config example that uses this module.
19
+
20
+ ---
21
+
22
+ If you want to help this project grow but don't know where to start, check out [contributing guides of 'mini.nvim'](https://nvim-mini.org/mini.nvim/CONTRIBUTING) or leave a Github star for 'mini.nvim' project and/or any its standalone Git repositories.
23
+
24
+ ## Demo
25
+
26
+ <!-- Demo source: https://github.com/nvim-mini/assets/blob/main/demo/demo-diff.mp4 -->
27
+ https://github.com/nvim-mini/mini.nvim/assets/24854248/77849127-ee9f-430b-9eff-5a8a724c21ea
28
+
29
+ ## Features
30
+
31
+ - Visualize difference between buffer text and its configurable reference interactively (updates as you type). This is done per line showing whether it is inside added, changed, or deleted part of difference (called hunk). Visualization can be with customizable colored signs or line numbers.
32
+
33
+ - Special toggleable overlay view with more hunk details inside text area.
34
+
35
+ - Completely configurable per buffer source(s) of reference text used to keep it up to date and define interactions with it. Can be array of sources which are attempted to attach in order. By default uses Git source (buffer's file text from Git index as reference).
36
+
37
+ - Configurable mappings to manage diff hunks:
38
+ - Apply and reset hunks inside region (selected visually or with a dot-repeatable operator).
39
+ - "Hunk range under cursor" textobject to be used as operator target.
40
+ - Navigate to first/previous/next/last hunk.
41
+
42
+ What it doesn't do:
43
+
44
+ - Provide functionality to work directly with Git outside of visualizing and staging (applying) hunks with (default) Git source. In particular, unstaging hunks is not supported.
45
+
46
+ For more information see these parts of help:
47
+
48
+ - `:h MiniDiff-overview`
49
+ - `:h MiniDiff-source-specification`
50
+ - `:h MiniDiff-hunk-specification`
51
+ - `:h MiniDiff-diff-summary`
52
+
53
+ ## Overview
54
+
55
+ ### Diffs and hunks
56
+
57
+ The "diff" (short for "difference") is a result of computing how two text strings differ from one another. This is done on per line basis, i.e. the goal is to compute sequences of lines common to both files, interspersed with groups of differing lines (called "hunks").
58
+
59
+ Although computing diff is a general concept (used on its own, in Git, etc.), this module computes difference between current text in a buffer and some reference text which is kept up to date specifically for that buffer. For example, default reference text is computed as file content in Git index. This can be customized in `config.source`.
60
+
61
+ ### Life cycle
62
+
63
+ - When entering proper (not already enabled, valid, showing text) buffer, it is attempted to be enabled for diff processing.
64
+ - During enabling, attempt attaching the source. This should set up how reference text is kept up to date.
65
+ - On every text change, diff computation is scheduled in debounced fashion after customizable delay (200 ms by default).
66
+ - After the diff is computed, do the following:
67
+ - Update visualization based on configurable style: either by placing colored text in sign column or coloring line numbers. Colors for both styles are defined per hunk type in corresponding `MiniDiffSign*` highlight group and sign text for "sign" style can be configured in `config.view.signs`.
68
+ - Update overlay view (if it is enabled).
69
+ - Update `vim.b.minidiff_summary` and `vim.b.minidiff_summary_string` buffer-local variables. These can be used, for example, in statusline.
70
+ - Trigger `MiniDiffUpdated` `User` event. See `:h MiniDiff-diff-summary` for example of how to use it.
71
+
72
+ Notes:
73
+
74
+ - Use `:edit` to reset (disable and re-enable) current buffer.
75
+
76
+ ### Overlay
77
+
78
+ Along with basic visualization, there is a special view called "overlay". Although it is meant for temporary overview of diff details and can be manually toggled via `MiniDiff.toggle_overlay()`, text can be changed with overlay reacting accordingly.
79
+
80
+ It shows more diff details inside text area:
81
+
82
+ - Added buffer lines are highlighted with `MiniDiffOverAdd` highlight group.
83
+ - Deleted reference lines are shown as virtual text and highlighted with `MiniDiffOverDelete` highlight group.
84
+ - Changed reference lines are shown as virtual text and highlighted with `MiniDiffOverChange` highlight group.
85
+
86
+ "Change" hunks with equal number of buffer and reference lines have special treatment and show "word diff". Reference line is shown next to its buffer counterpart and only changed parts of both lines are highlighted with `MiniDiffOverChange`. The rest of reference line has `MiniDiffOverContext` highlighting.
87
+
88
+ This usually is the case when `config.options.linematch` is enabled.
89
+
90
+ ### Mappings
91
+
92
+ This module provides mappings for common actions with diffs, like:
93
+
94
+ - Apply and reset hunks.
95
+ - "Hunk range under cursor" textobject.
96
+ - Go to first/previous/next/last hunk range.
97
+
98
+ Examples:
99
+
100
+ - `vip` followed by `gh` / `gH` applies/resets hunks inside current paragraph. Same can be achieved in operator form `ghip` / `gHip`, which has the advantage of being dot-repeatable.
101
+ - `gh_` / `gH_` applies/resets current line (even if it is not a full hunk).
102
+ - `ghgh` / `gHgh` applies/resets hunk range under cursor.
103
+ - `dgh` deletes hunk range under cursor.
104
+ - `[H` / `[h` / `]h` / `]H` navigate cursor to the first / previous / next / last hunk range of the current buffer.
105
+
106
+ Mappings for some functionality are assumed to be done manually. See `:h MiniDiff.operator()`.
107
+
108
+ ### Buffer-local variables
109
+
110
+ Each enabled buffer has the following buffer-local variables which can be used in custom statusline to show an overview of hunks in current buffer:
111
+
112
+ - `vim.b.minidiff_summary` is a table with the following fields:
113
+ - `source_name` - name of the source.
114
+ - `n_ranges` - number of hunk ranges (sequences of contiguous hunks).
115
+ - `add` - number of added lines.
116
+ - `change` - number of changed lines.
117
+ - `delete` - number of deleted lines.
118
+
119
+ - `vim.b.minidiff_summary_string` is a string representation of summary with a fixed format. It is expected to be used as is. To achieve different formatting, use `vim.b.minidiff_summary` to construct one. The best way to do this is by overriding `vim.b.minidiff_summary_string` in the callback for `MiniDiffUpdated` event:
120
+
121
+ ```lua
122
+ local format_summary = function(data)
123
+ local summary = vim.b[data.buf].minidiff_summary
124
+ local t = {}
125
+ if summary.add > 0 then table.insert(t, '+' .. summary.add) end
126
+ if summary.change > 0 then table.insert(t, '~' .. summary.change) end
127
+ if summary.delete > 0 then table.insert(t, '-' .. summary.delete) end
128
+ vim.b[data.buf].minidiff_summary_string = table.concat(t, ' ')
129
+ end
130
+ local au_opts = { pattern = 'MiniDiffUpdated', callback = format_summary }
131
+ vim.api.nvim_create_autocmd('User', au_opts)
132
+ ```
133
+
134
+ ## Installation
135
+
136
+ This plugin can be installed as part of 'mini.nvim' library (**recommended**) or as a standalone Git repository.
137
+
138
+ There are two branches to install from:
139
+
140
+ - `main` (default, **recommended**) will have latest development version of plugin. All changes since last stable release should be perceived as being in beta testing phase (meaning they already passed alpha-testing and are moderately settled).
141
+ - `stable` will be updated only upon releases with code tested during public beta-testing phase in `main` branch.
142
+
143
+ Here are code snippets for some common installation methods (use only one):
144
+
145
+ <details>
146
+ <summary><b>(Recommended)</b> With <a href="https://neovim.io/doc/user/helptag.html?tag=vim.pack">vim.pack</a> (on Neovim 0.12 and newer)</summary>
147
+
148
+ **Full library**
149
+
150
+ Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
151
+
152
+ **Standalone plugin**
153
+
154
+ Main branch:
155
+
156
+ ```lua
157
+ vim.pack.add({ 'https://github.com/nvim-mini/mini.diff' })
158
+ ```
159
+
160
+ Stable branch:
161
+
162
+ ```lua
163
+ vim.pack.add({
164
+ { src = 'https://github.com/nvim-mini/mini.diff', version = 'stable' },
165
+ })
166
+ ```
167
+
168
+ </details>
169
+
170
+ <details>
171
+ <summary>With <a href="https://nvim-mini.org/mini.nvim/readmes/mini-deps">mini.deps</a> (before Neovim 0.12)</summary>
172
+
173
+ **Full library**
174
+
175
+ Follow [recommended 'mini.deps' installation](https://nvim-mini.org/mini.nvim/readmes/mini-deps#installation).
176
+
177
+ **Standalone plugin**:
178
+
179
+ Main branch:
180
+
181
+ ```lua
182
+ add('nvim-mini/mini.diff')
183
+ ```
184
+
185
+ Stable branch:
186
+
187
+ ```lua
188
+ add({ source = 'nvim-mini/mini.diff', checkout = 'stable' })
189
+ ```
190
+
191
+ </details>
192
+
193
+ <details>
194
+ <summary>With <a href="https://github.com/folke/lazy.nvim">folke/lazy.nvim</a></summary>
195
+
196
+ **Full library**
197
+
198
+ Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
199
+
200
+ **Standalone plugin**
201
+
202
+ Main branch:
203
+
204
+ ```lua
205
+ { 'nvim-mini/mini.diff', version = false },
206
+ ```
207
+
208
+ Stable branch:
209
+
210
+ ```lua
211
+ { 'nvim-mini/mini.diff', version = '*' },
212
+ ```
213
+
214
+ </details>
215
+
216
+ **Important**: don't forget to call `require('mini.diff').setup()` to enable its functionality.
217
+
218
+ **Note**: if you are on Windows, there might be problems with too long file paths (like `error: unable to create file <some file name>: Filename too long`). Try doing one of the following:
219
+
220
+ - Enable corresponding git global config value: `git config --system core.longpaths true`. Then try to reinstall.
221
+ - Install plugin in other place with shorter path.
222
+
223
+ ## Default config
224
+
225
+ ```lua
226
+ -- No need to copy this inside `setup()`. Will be used automatically.
227
+ {
228
+ -- Options for how hunks are visualized
229
+ view = {
230
+ -- Visualization style. Possible values are 'sign' and 'number'.
231
+ -- Default: 'number' if line numbers are enabled, 'sign' otherwise.
232
+ style = vim.go.number and 'number' or 'sign',
233
+
234
+ -- Signs used for hunks with 'sign' view
235
+ signs = { add = '▒', change = '▒', delete = '▒' },
236
+
237
+ -- Priority of used visualization extmarks
238
+ priority = 199,
239
+ },
240
+
241
+ -- Source(s) for how reference text is computed/updated/etc
242
+ -- Uses content from Git index by default
243
+ source = nil,
244
+
245
+ -- Delays (in ms) defining asynchronous processes
246
+ delay = {
247
+ -- How much to wait before update following every text change
248
+ text_change = 200,
249
+ },
250
+
251
+ -- Module mappings. Use `''` (empty string) to disable one.
252
+ mappings = {
253
+ -- Apply hunks inside a visual/operator region
254
+ apply = 'gh',
255
+
256
+ -- Reset hunks inside a visual/operator region
257
+ reset = 'gH',
258
+
259
+ -- Hunk range textobject to be used inside operator
260
+ -- Works also in Visual mode if mapping differs from apply and reset
261
+ textobject = 'gh',
262
+
263
+ -- Go to hunk range in corresponding direction
264
+ goto_first = '[H',
265
+ goto_prev = '[h',
266
+ goto_next = ']h',
267
+ goto_last = ']H',
268
+ },
269
+
270
+ -- Various options
271
+ options = {
272
+ -- Diff algorithm (see `:h vim.text.diff()`)
273
+ algorithm = 'histogram',
274
+
275
+ -- Whether to use "indent heuristic" (see `:h vim.text.diff()`)
276
+ indent_heuristic = true,
277
+
278
+ -- The amount of second-stage diff to align lines
279
+ linematch = 60,
280
+
281
+ -- Whether to wrap around edges during hunk navigation
282
+ wrap_goto = false,
283
+ },
284
+ }
285
+ ```
286
+
287
+ ## Similar plugins
288
+
289
+ - [lewis6991/gitsigns.nvim](https://github.com/lewis6991/gitsigns.nvim)
@@ -0,0 +1,198 @@
1
+ <p align="center"> <img src="https://github.com/nvim-mini/assets/blob/main/logo-2/logo-doc_readme.png?raw=true" alt="mini.doc" style="max-width:100%;border:solid 2px"/> </p>
2
+
3
+ ### Generation of help files from EmmyLua-like annotations
4
+
5
+ See more details in [Features](#features) and [Documentation](../doc/mini-doc.txt).
6
+
7
+ ---
8
+
9
+ > [!NOTE]
10
+ > This was previously hosted at a personal `echasnovski` GitHub account. It was transferred to a dedicated organization to improve long term project stability. See more details [here](https://github.com/nvim-mini/mini.nvim/discussions/1970).
11
+
12
+ ⦿ This is a part of [mini.nvim](https://nvim-mini.org/mini.nvim) library. Please use [this link](https://nvim-mini.org/mini.nvim/readmes/mini-doc) if you want to mention this module.
13
+
14
+ ⦿ All contributions (issues, pull requests, discussions, etc.) are done inside of 'mini.nvim'.
15
+
16
+ ⦿ See [whole library documentation](https://nvim-mini.org/mini.nvim/doc/mini-nvim) to learn about general design principles, disable/configuration recipes, and more.
17
+
18
+ ---
19
+
20
+ If you want to help this project grow but don't know where to start, check out [contributing guides of 'mini.nvim'](https://nvim-mini.org/mini.nvim/CONTRIBUTING) or leave a Github star for 'mini.nvim' project and/or any its standalone Git repositories.
21
+
22
+ ## Demo
23
+
24
+ <!-- Demo source: https://github.com/nvim-mini/assets/blob/main/demo/demo-doc.mp4 -->
25
+ https://user-images.githubusercontent.com/24854248/173044513-755dec35-4f6c-4a51-aa96-5e380f6d744f.mp4
26
+
27
+ ## Features
28
+
29
+ - Keep documentation next to code by writing EmmyLua-like annotation comments. They will be parsed as is, so formatting should follow built-in guide. However, custom hooks are allowed at many generation stages for more granular management of output help file.
30
+ - Generation is done by processing a set of ordered files line by line. Each line can either be considered as a part of documentation block (if it matches certain configurable pattern) or not (considered to be an "afterline" of documentation block). See `MiniDoc.generate()` help for more details.
31
+ - Processing is done by using nested data structures (section, block, file, doc) describing certain parts of help file. See `MiniDoc-data-structures` help page for more details.
32
+ - Allow flexible customization of output via hook functions.
33
+ - Project specific script can be written as plain Lua file with configuratble path. See `MiniDoc.generate()` help for more details.
34
+
35
+ ## Installation
36
+
37
+ This plugin can be installed as part of 'mini.nvim' library (**recommended**) or as a standalone Git repository.
38
+
39
+ There are two branches to install from:
40
+
41
+ - `main` (default, **recommended**) will have latest development version of plugin. All changes since last stable release should be perceived as being in beta testing phase (meaning they already passed alpha-testing and are moderately settled).
42
+ - `stable` will be updated only upon releases with code tested during public beta-testing phase in `main` branch.
43
+
44
+ Here are code snippets for some common installation methods (use only one):
45
+
46
+ <details>
47
+ <summary><b>(Recommended)</b> With <a href="https://neovim.io/doc/user/helptag.html?tag=vim.pack">vim.pack</a> (on Neovim 0.12 and newer)</summary>
48
+
49
+ **Full library**
50
+
51
+ Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
52
+
53
+ **Standalone plugin**
54
+
55
+ Main branch:
56
+
57
+ ```lua
58
+ vim.pack.add({ 'https://github.com/nvim-mini/mini.doc' })
59
+ ```
60
+
61
+ Stable branch:
62
+
63
+ ```lua
64
+ vim.pack.add({
65
+ { src = 'https://github.com/nvim-mini/mini.doc', version = 'stable' },
66
+ })
67
+ ```
68
+
69
+ </details>
70
+
71
+ <details>
72
+ <summary>With <a href="https://nvim-mini.org/mini.nvim/readmes/mini-deps">mini.deps</a> (before Neovim 0.12)</summary>
73
+
74
+ **Full library**
75
+
76
+ Follow [recommended 'mini.deps' installation](https://nvim-mini.org/mini.nvim/readmes/mini-deps#installation).
77
+
78
+ **Standalone plugin**:
79
+
80
+ Main branch:
81
+
82
+ ```lua
83
+ add('nvim-mini/mini.doc')
84
+ ```
85
+
86
+ Stable branch:
87
+
88
+ ```lua
89
+ add({ source = 'nvim-mini/mini.doc', checkout = 'stable' })
90
+ ```
91
+
92
+ </details>
93
+
94
+ <details>
95
+ <summary>With <a href="https://github.com/folke/lazy.nvim">folke/lazy.nvim</a></summary>
96
+
97
+ **Full library**
98
+
99
+ Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
100
+
101
+ **Standalone plugin**
102
+
103
+ Main branch:
104
+
105
+ ```lua
106
+ { 'nvim-mini/mini.doc', version = false },
107
+ ```
108
+
109
+ Stable branch:
110
+
111
+ ```lua
112
+ { 'nvim-mini/mini.doc', version = '*' },
113
+ ```
114
+
115
+ </details>
116
+
117
+ **Important**: don't forget to call `require('mini.doc').setup()` to enable its functionality.
118
+
119
+ **Note**: if you are on Windows, there might be problems with too long file paths (like `error: unable to create file <some file name>: Filename too long`). Try doing one of the following:
120
+
121
+ - Enable corresponding git global config value: `git config --system core.longpaths true`. Then try to reinstall.
122
+ - Install plugin in other place with shorter path.
123
+
124
+ ## Default config
125
+
126
+ ```lua
127
+ -- No need to copy this inside `setup()`. Will be used automatically.
128
+ {
129
+ -- Lua string pattern to determine if line has documentation annotation.
130
+ -- First capture group should describe possible section id. Default value
131
+ -- means that annotation line should:
132
+ -- - Start with `---` at first column.
133
+ -- - Any non-whitespace after `---` will be treated as new section id.
134
+ -- - Single whitespace at the start of main text will be ignored.
135
+ annotation_pattern = '^%-%-%-(%S*) ?',
136
+
137
+ -- Identifier of block annotation lines until first captured identifier
138
+ default_section_id = '@text',
139
+
140
+ -- Hooks to be applied at certain stage of document life cycle. Should
141
+ -- modify its input in place (and not return new one).
142
+ hooks = {
143
+ -- Applied to block before anything else
144
+ block_pre = --<function: infers header sections (tag and/or signature)>,
145
+
146
+ -- Applied to section before anything else
147
+ section_pre = --<function: replaces current aliases>,
148
+
149
+ -- Applied if section has specified captured id
150
+ sections = {
151
+ ['@alias'] = --<function: registers alias in MiniDoc.current.aliases>,
152
+ ['@class'] = --<function>,
153
+ -- For most typical usage see |MiniDoc.afterlines_to_code|
154
+ ['@eval'] = --<function: evaluates lines; replaces with their return>,
155
+ ['@field'] = --<function>,
156
+ ['@param'] = --<function>,
157
+ ['@private'] = --<function: registers block for removal>,
158
+ ['@return'] = --<function>,
159
+ ['@seealso'] = --<function>,
160
+ ['@signature'] = --<function: formats signature of documented object>,
161
+ ['@tag'] = --<function: turns its line in proper tag lines>,
162
+ ['@text'] = --<function: purposefully does nothing>,
163
+ ['@type'] = --<function>,
164
+ ['@usage'] = --<function>,
165
+ },
166
+
167
+ -- Applied to section after all previous steps
168
+ section_post = --<function: currently does nothing>,
169
+
170
+ -- Applied to block after all previous steps
171
+ block_post = --<function: does many things>,
172
+
173
+ -- Applied to file after all previous steps
174
+ file = --<function: adds separator>,
175
+
176
+ -- Applied to doc after all previous steps
177
+ doc = --<function: adds modeline>,
178
+
179
+ -- Applied before output file is written. Takes lines array as argument.
180
+ write_pre = --<function: removes delimiters at the top>,
181
+
182
+ -- Applied after output help file is written. Takes doc as argument.
183
+ write_post = --<function: various convenience actions>,
184
+ },
185
+
186
+ -- Path (relative to current directory) to script which handles project
187
+ -- specific help file generation (like custom input files, hooks, etc.).
188
+ script_path = 'scripts/minidoc.lua',
189
+
190
+ -- Whether to disable showing non-error feedback
191
+ silent = false,
192
+ }
193
+ ```
194
+
195
+ ## Similar plugins
196
+
197
+ - [tjdevries/tree-sitter-lua](https://github.com/tjdevries/tree-sitter-lua)
198
+ - [numToStr/lemmy-help](https://github.com/numToStr/lemmy-help) (command line tool)
@@ -0,0 +1,158 @@
1
+ <p align="center"> <img src="https://github.com/nvim-mini/assets/blob/main/logo-2/logo-extra_readme.png?raw=true" alt="mini.extra" style="max-width:100%;border:solid 2px"/> </p>
2
+
3
+ ### Extra 'mini.nvim' functionality
4
+
5
+ See more details in [Features](#features) and [Documentation](../doc/mini-extra.txt).
6
+
7
+ ---
8
+
9
+ > [!NOTE]
10
+ > This was previously hosted at a personal `echasnovski` GitHub account. It was transferred to a dedicated organization to improve long term project stability. See more details [here](https://github.com/nvim-mini/mini.nvim/discussions/1970).
11
+
12
+ ⦿ This is a part of [mini.nvim](https://nvim-mini.org/mini.nvim) library. Please use [this link](https://nvim-mini.org/mini.nvim/readmes/mini-extra) if you want to mention this module.
13
+
14
+ ⦿ All contributions (issues, pull requests, discussions, etc.) are done inside of 'mini.nvim'.
15
+
16
+ ⦿ See [whole library documentation](https://nvim-mini.org/mini.nvim/doc/mini-nvim) to learn about general design principles, disable/configuration recipes, and more.
17
+
18
+ ⦿ See [MiniMax](https://nvim-mini.org/MiniMax) for a full config example that uses this module.
19
+
20
+ ---
21
+
22
+ If you want to help this project grow but don't know where to start, check out [contributing guides of 'mini.nvim'](https://nvim-mini.org/mini.nvim/CONTRIBUTING) or leave a Github star for 'mini.nvim' project and/or any its standalone Git repositories.
23
+
24
+ ## Demo
25
+
26
+ <!-- Demo source: https://github.com/nvim-mini/assets/blob/main/demo/demo-extra.mp4 -->
27
+ https://github.com/nvim-mini/mini.nvim/assets/24854248/31ceb716-eefa-4858-b77f-5b6b3fe594f5
28
+
29
+ ## Features
30
+
31
+ Extra useful functionality which is not essential enough for other 'mini.nvim' modules to include directly.
32
+
33
+ Features:
34
+
35
+ - Various pickers for ['mini.pick'](https://nvim-mini.org/mini.nvim/readmes/mini-pick):
36
+ - Built-in diagnostic (`MiniExtra.pickers.diagnostic()`).
37
+ - File explorer (`MiniExtra.pickers.explorer()`).
38
+ - Git branches/commits/files/hunks (`MiniExtra.pickers.git_hunks()`, etc.).
39
+ - Command/search/input history (`MiniExtra.pickers.history()`).
40
+ - LSP references/symbols/etc. (`MiniExtra.pickers.lsp()`).
41
+ - Tree-sitter nodes (`MiniExtra.pickers.treesitter()`).
42
+ - **And much more**.
43
+ See `:h MiniExtra.pickers` for more.
44
+
45
+ - Various textobject specifications for ['mini.ai'](https://nvim-mini.org/mini.nvim/readmes/mini-ai). See `:h MiniExtra.gen_ai_spec`.
46
+
47
+ - Various highlighters for ['mini.hipatterns'](https://nvim-mini.org/mini.nvim/readmes/mini-hipatterns). See `:h MiniExtra.gen_highlighter`.
48
+
49
+ Notes:
50
+
51
+ - This module requires only those 'mini.nvim' modules which are needed for a particular functionality: 'mini.pick' for pickers, etc.
52
+
53
+ For more information see these parts of help:
54
+
55
+ - `:h MiniExtra.pickers`
56
+ - `:h MiniExtra.gen_ai_spec`
57
+ - `:h MiniExtra.gen_highlighter`
58
+
59
+ ## Installation
60
+
61
+ This plugin can be installed as part of 'mini.nvim' library (**recommended**) or as a standalone Git repository.
62
+
63
+ There are two branches to install from:
64
+
65
+ - `main` (default, **recommended**) will have latest development version of plugin. All changes since last stable release should be perceived as being in beta testing phase (meaning they already passed alpha-testing and are moderately settled).
66
+ - `stable` will be updated only upon releases with code tested during public beta-testing phase in `main` branch.
67
+
68
+ Here are code snippets for some common installation methods (use only one):
69
+
70
+ <details>
71
+ <summary><b>(Recommended)</b> With <a href="https://neovim.io/doc/user/helptag.html?tag=vim.pack">vim.pack</a> (on Neovim 0.12 and newer)</summary>
72
+
73
+ **Full library**
74
+
75
+ Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
76
+
77
+ **Standalone plugin**
78
+
79
+ Main branch:
80
+
81
+ ```lua
82
+ vim.pack.add({ 'https://github.com/nvim-mini/mini.extra' })
83
+ ```
84
+
85
+ Stable branch:
86
+
87
+ ```lua
88
+ vim.pack.add({
89
+ { src = 'https://github.com/nvim-mini/mini.extra', version = 'stable' },
90
+ })
91
+ ```
92
+
93
+ </details>
94
+
95
+ <details>
96
+ <summary>With <a href="https://nvim-mini.org/mini.nvim/readmes/mini-deps">mini.deps</a> (before Neovim 0.12)</summary>
97
+
98
+ **Full library**
99
+
100
+ Follow [recommended 'mini.deps' installation](https://nvim-mini.org/mini.nvim/readmes/mini-deps#installation).
101
+
102
+ **Standalone plugin**:
103
+
104
+ Main branch:
105
+
106
+ ```lua
107
+ add('nvim-mini/mini.extra')
108
+ ```
109
+
110
+ Stable branch:
111
+
112
+ ```lua
113
+ add({ source = 'nvim-mini/mini.extra', checkout = 'stable' })
114
+ ```
115
+
116
+ </details>
117
+
118
+ <details>
119
+ <summary>With <a href="https://github.com/folke/lazy.nvim">folke/lazy.nvim</a></summary>
120
+
121
+ **Full library**
122
+
123
+ Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
124
+
125
+ **Standalone plugin**
126
+
127
+ Main branch:
128
+
129
+ ```lua
130
+ { 'nvim-mini/mini.extra', version = false },
131
+ ```
132
+
133
+ Stable branch:
134
+
135
+ ```lua
136
+ { 'nvim-mini/mini.extra', version = '*' },
137
+ ```
138
+
139
+ </details>
140
+
141
+ **Important**: don't forget to call `require('mini.extra').setup()` to enable its functionality.
142
+
143
+ **Note**: if you are on Windows, there might be problems with too long file paths (like `error: unable to create file <some file name>: Filename too long`). Try doing one of the following:
144
+
145
+ - Enable corresponding git global config value: `git config --system core.longpaths true`. Then try to reinstall.
146
+ - Install plugin in other place with shorter path.
147
+
148
+ ## Default config
149
+
150
+ ```lua
151
+ -- No need to copy this inside `setup()`. Will be used automatically.
152
+ {}
153
+ ```
154
+
155
+ ## Similar plugins
156
+
157
+ - [nvim-telescope/telescope.nvim](https://github.com/nvim-telescope/telescope.nvim)
158
+ - [ibhagwan/fzf-lua](https://github.com/ibhagwan/fzf-lua)