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,392 @@
1
+ *mini.cmdline* Command line tweaks
2
+
3
+ MIT License Copyright (c) 2025 Evgeni Chasnovski
4
+
5
+ ------------------------------------------------------------------------------
6
+ *MiniCmdline*
7
+ Features:
8
+
9
+ - Autocomplete with customizable delay. Enhances |cmdline-completion| and
10
+ manual |'wildchar'| pressing experience.
11
+ Requires Neovim>=0.11, though Neovim>=0.12 is recommended.
12
+
13
+ - Autocorrect words as-you-type. Only words that must come from a fixed set of
14
+ candidates (like commands and options) are autocorrected by default.
15
+
16
+ - Autopeek command range as-you-type. Shows a floating window with range lines
17
+ along with customizable context lines.
18
+
19
+ What it doesn't do:
20
+
21
+ - Customization of command line UI. Use |ui2| (on Neovim>=0.12).
22
+
23
+ - Customization of autocompletion candidates. They are computed
24
+ via |cmdline-completion|.
25
+
26
+ # Setup ~
27
+
28
+ This module needs a setup with `require('mini.cmdline').setup({})` (replace `{}`
29
+ with your `config` table). It will create global Lua table `MiniCmdline` which
30
+ you can use for scripting or manually (with `:lua MiniCmdline.*`).
31
+
32
+ See |MiniCmdline.config| for `config` structure and default values.
33
+
34
+ You can override runtime config settings locally to buffer inside
35
+ `vim.b.minicmdline_config` which should have same structure as
36
+ `MiniCmdline.config`. See |mini.nvim-buffer-local-config| for more details.
37
+
38
+ # Suggested option values ~
39
+
40
+ Some options are set automatically (if not set before |MiniCmdline.setup()|):
41
+ - |'wildmode'| is set to "noselect,full" for less intrusive autocompletion.
42
+ Requires Neovim>=0.11 and enabled `config.autocomplete`.
43
+ - |'wildoptions'| is set to "pum,fuzzy" to enable fuzzy matching.
44
+
45
+ # Comparisons ~
46
+
47
+ - [folke/noice.nvim](https://github.com/folke/noice.nvim):
48
+ - Mostly focuses on visual aspects of the Command line.
49
+ This modules is aimed to improve its workflow without changing UI.
50
+
51
+ - [nacro90/numb.nvim](https://github.com/nacro90/numb.nvim):
52
+ - Designed to preview only a single line range defined by numbers.
53
+ This module handles any form of |:range| and |:range-offset| for both
54
+ one and two line ranges.
55
+ - Shows target line directly in the normal window.
56
+ This module uses a dedicated floating window.
57
+
58
+ - Built-in |cmdline-autocompletion| (on Neovim>=0.12):
59
+ - This module on Neovim>=0.12 uses that as its base for autocompletion.
60
+ Ont top of that it also provides customizable delay and predicate.
61
+
62
+ - Built-in |ui2| (on Neovim>=0.12):
63
+ - Mostly focuses on visual aspects of the Command line.
64
+ This modules is aimed to improve its workflow without changing UI.
65
+
66
+ # Highlight groups ~
67
+ *MiniCmdline-hl-groups*
68
+
69
+ - `MiniCmdlinePeekBorder` - border of autopeek window.
70
+ - `MiniCmdlinePeekLineNr` - line numbers in autopeek window.
71
+ - `MiniCmdlinePeekNormal` - basic foreground/background of autopeek window.
72
+ - `MiniCmdlinePeekSep` - statuscolumn separator in autopeek window.
73
+ - `MiniCmdlinePeekSign` - signs in autopeek window.
74
+ - `MiniCmdlinePeekTitle` - title of autopeek window.
75
+
76
+ # Disabling ~
77
+
78
+ To disable acting in mappings, set `vim.g.minicmdline_disable` (globally) or
79
+ `vim.b.minicmdline_disable` (for a buffer) to `true`. Considering high number
80
+ of different scenarios and customization intentions, writing exact rules
81
+ for disabling module's functionality is left to user.
82
+ See |mini.nvim-disabling-recipes| for common recipes.
83
+
84
+ ------------------------------------------------------------------------------
85
+ *MiniCmdline.setup()*
86
+ `MiniCmdline.setup`({config})
87
+ Module setup
88
+
89
+ Parameters ~
90
+ {config} `(table|nil)` Module config table. See |MiniCmdline.config|.
91
+
92
+ Usage ~
93
+ >lua
94
+ require('mini.cmdline').setup() -- use default config
95
+ -- OR
96
+ require('mini.cmdline').setup({}) -- replace {} with your config table
97
+ <
98
+ ------------------------------------------------------------------------------
99
+ *MiniCmdline.config*
100
+ `MiniCmdline.config`
101
+ Defaults ~
102
+ >lua
103
+ MiniCmdline.config = {
104
+ -- Autocompletion: show `:h 'wildmenu'` as you type
105
+ autocomplete = {
106
+ enable = true,
107
+
108
+ -- Delay (in ms) after which to trigger completion
109
+ -- Neovim>=0.12 is recommended for positive values
110
+ delay = 0,
111
+
112
+ -- Custom rule of when to trigger completion
113
+ predicate = nil,
114
+
115
+ -- Whether to map arrow keys for more consistent wildmenu behavior
116
+ map_arrows = true,
117
+ },
118
+
119
+ -- Autocorrection: adjust non-existing words (commands, options, etc.)
120
+ autocorrect = {
121
+ enable = true,
122
+
123
+ -- Custom autocorrection rule
124
+ func = nil,
125
+ },
126
+
127
+ -- Autopeek: show command's target range in a floating window
128
+ autopeek = {
129
+ enable = true,
130
+
131
+ -- Number of lines to show above and below range lines
132
+ n_context = 1,
133
+
134
+ -- Custom rule of when to show peek window
135
+ predicate = nil,
136
+
137
+ -- Window options
138
+ window = {
139
+ -- Floating window config
140
+ config = {},
141
+
142
+ -- Function to render statuscolumn
143
+ statuscolumn = nil,
144
+ },
145
+ },
146
+ }
147
+ <
148
+ # General ~
149
+
150
+ - Each feature is configured via separate table.
151
+ - Use `enable = false` to disable a feature.
152
+
153
+ Autocomplete ~
154
+
155
+ `config.autocomplete` is used to configure autocompletion: automatic show
156
+ of |'wildmenu'|.
157
+
158
+ `autocomplete.delay` defines a (debounce style) delay after which |'wildchar'|
159
+ is triggered to show wildmenu.
160
+ Default: 0. Note: Neovim>=0.12 is recommended for positive values if you
161
+ want to reduce flicker (thanks to |wildtrigger()|).
162
+
163
+ `autocomplete.predicate` defines a condition of whether to trigger completion
164
+ at the current command line state. Takes a table with input data and should
165
+ return `true` to show completion and `false` otherwise. Will be called before
166
+ the possible delay at current command line state.
167
+ Default: |MiniCmdline.default_autocomplete_predicate()|.
168
+
169
+ Input data fields:
170
+ - <line> `(string)` - current command line text. See |getcmdline()|.
171
+ - <pos> `(number)` - current command line column. See |getcmdpos()|.
172
+ - <line_prev> `(string)` - command line text before the latest change.
173
+ - <pos_prev> `(number)` - command line column before the latest cursor move.
174
+
175
+ Example of blocking completion based on completion type (as some may be slow): >lua
176
+
177
+ local block_compltype = { shellcmd = true }
178
+ require('mini.cmdline').setup({
179
+ autocomplete = {
180
+ predicate = function()
181
+ return not block_compltype[vim.fn.getcmdcompltype()]
182
+ end,
183
+ },
184
+ })
185
+ <
186
+ Similar approach can be used to enable completion only for normal Ex commands.
187
+ Use `return vim.fn.getcmdtype() == ':'` as a predicate output.
188
+
189
+ Autocorrect ~
190
+
191
+ `config.autocorrect` is used to configure autocorrection: automatic adjustment
192
+ of bad words as you type them. This works only when appending single character
193
+ at the end of the command line. Editing already typed words does not trigger
194
+ autocorrect (allows correcting the autocorrection).
195
+
196
+ When to autocorrect is computed automatically based on |getcmdcomplpat()| after
197
+ every key press: if it doesn't add the character to completion pattern, then
198
+ the pattern before the key press is attempted to be corrected.
199
+ There is also an autocorrection attempt for the last word just before
200
+ executing the command.
201
+
202
+ Notes:
203
+ - This is intended mostly for fixing typos and not as a shortcut for fuzzy
204
+ matching. Performing the latter automatically is too intrusive. Explicitly
205
+ use fuzzy completion for that (set up by default).
206
+
207
+ - Default autocorrection is done only for words that must come from a fixed
208
+ set of candidates (like commands and options) by choosing the one with
209
+ the lowest string distance.
210
+ See |MiniCmdline.default_autocorrect_func()| for details.
211
+
212
+ - Word that matches some Command-line |abbreviation| is not autocorrected.
213
+
214
+ - If current command expects only a single argument (like |:colorscheme|), then
215
+ autocorrection will happen only just before executing the command.
216
+
217
+ `autocorrect.func` is a function that can be used to customize autocorrection.
218
+ Takes a table with input data and should return a string with the correct word
219
+ or `nil` for no autocorrection. Default: |MiniCmdline.default_autocorrect_func()|.
220
+
221
+ Input data fields:
222
+ - <word> `(string)` - word to be autocorrected. Never empty string.
223
+ - <type> `(string)` - word type. Output of |getcmdcompltype()|.
224
+
225
+ Autopeek ~
226
+
227
+ `config.autopeek` is used to configure automatic peeking: show command's target
228
+ range in a floating window. The window will appear above command line and show
229
+ current buffer with the focus on left and right (if present and differs from
230
+ left) range lines.
231
+
232
+ `autopeek.n_context` defines how many lines to show above and below the target.
233
+ The range itself is visualized by default with the statuscolumn signs.
234
+ Default: 1.
235
+
236
+ `autopeek.predicate` defines a condition of whether to show peek window at
237
+ the current command line state. Takes a table with input data and should
238
+ return `true` to peek and `false` otherwise.
239
+ Will be called only if it is possible to parse range from the current command
240
+ line text and it is for buffer lines (no command or |:command-addr| is `lines`)
241
+ Default: |MiniCmdline.default_autopeek_predicate()|.
242
+
243
+ Input data fields:
244
+ - <left> `(number)` - left range edge. Not necessarily smallest.
245
+ - <right> `(number)` - right range edge. Same as `left` for a single line range.
246
+ - <cmd> `(string)` - full command name. Can be empty string if no valid
247
+ command is (yet) entered.
248
+
249
+ `autopeek.window` defines behavior of a peek window.
250
+ `autopeek.window.config` is a table defining floating window characteristics
251
+ or a callable returning such table.
252
+ It should have the same structure as in |nvim_open_win()|.
253
+
254
+ `autopeek.window.statuscolumn` is a special function that can be used to
255
+ customize |'statuscolumn'| value for the peek window. Takes a table with input
256
+ data and should return a string to display for line |v:lnum|.
257
+ Default: |MiniCmdline.default_autopeek_statuscolumn()|.
258
+ Input data fields are the same as for `autopeek.predicate`.
259
+
260
+ Example of showing `<` and `>` signs on range lines: >lua
261
+
262
+ function(data)
263
+ local n, l, r = vim.v.lnum, data.left, data.right
264
+ local s = n == l and (n == r and '* ' or '< ') or n == r and '> ' or ''
265
+ -- Needs explicit highlighting via `:h 'statusline'` syntax
266
+ return '%#MiniCmdlinePeekSign#' .. s
267
+ end
268
+ <
269
+ Notes:
270
+ - Peek window directly shows current buffer, which means that all its
271
+ extmarks, virtual text, virtual lines, etc. are also shown.
272
+ - Non-zero context might work unreliably if there are virtual lines.
273
+ - Peeking intentionally hides Visual selection if Command-line mode is entered
274
+ directly from it. Peeking `'<,'>` range already visualizes the selection.
275
+ To disable autopeek for this case, add the following code BEFORE
276
+ executing `require('mini.cmdline').setup()`: >lua
277
+
278
+ local disable = vim.schedule_wrap(function()
279
+ local is_from_visual = vim.startswith(vim.fn.getcmdline(), "'<,'>")
280
+ MiniCmdline.config.autopeek.enable = not is_from_visual
281
+ end)
282
+ local reenable = function() MiniCmdline.config.autopeek.enable = true end
283
+
284
+ vim.api.nvim_create_autocmd('CmdlineEnter', { callback = disable })
285
+ vim.api.nvim_create_autocmd('CmdlineLeave', { callback = reenable })
286
+ <
287
+ ------------------------------------------------------------------------------
288
+ *MiniCmdline.default_autocomplete_predicate()*
289
+ `MiniCmdline.default_autocomplete_predicate`({data}, {opts})
290
+ Default autocompletion predicate
291
+
292
+ Parameters ~
293
+ {data} `(table)` Input autocompletion data. As described in |MiniCmdline.config|.
294
+ {opts} `(table|nil)` Options. Reserved for future use.
295
+
296
+ Return ~
297
+ `(boolean)` If command line does not (yet) contain a letter - `false`,
298
+ otherwise - `true`. This makes autopeek easier to use for a numerical range.
299
+
300
+ ------------------------------------------------------------------------------
301
+ *MiniCmdline.default_autocorrect_func()*
302
+ `MiniCmdline.default_autocorrect_func`({data}, {opts})
303
+ Default autocorrection function
304
+
305
+ - Return input word if `opts.strict_type=true` and input `type` is not proper.
306
+ - Get candidates via `opts.get_candidates()`.
307
+ Default: mostly via |getcompletion()| with empty pattern and input `type`.
308
+ Exceptions are `help` and `option` types: both list all available candidates
309
+ in their own ways.
310
+ - Choose the candidate with the lowest Damerau–Levenshtein distance
311
+ (smallest number of deletion/insertion/substitution/transposition needed
312
+ to transform one word into another; slightly prefers transposition).
313
+ Notes:
314
+ - Type `'command'` also chooses from all valid candidate abbreviations.
315
+ - Comparison is done both respecting and ignoring case.
316
+
317
+ Parameters ~
318
+ {data} `(table)` Input autocorrection data. As described in |MiniCmdline.config|.
319
+ {opts} `(table|nil)` Options. Possible fields:
320
+ - <strict_type> `(boolean)` - whether to restrict output only for types which
321
+ must have words from a fixed set of candidates (like command or option
322
+ names). Note: does not include `help` type since |:help| already has
323
+ "sophisticated algorithm" to handle typos. Default: `true`.
324
+ - <get_candidates> `(function)` - source of candidates. Will be called
325
+ with `data` as argument and should return array of string candidates to
326
+ choose from.
327
+ Default: for most types - |getcompletion()| with empty pattern and
328
+ input `type`; for `help` and `option` type - all available help tags and
329
+ option names (long and short) respectively.
330
+
331
+ Return ~
332
+ `(string)` Autocorrected word.
333
+
334
+ ------------------------------------------------------------------------------
335
+ *MiniCmdline.default_autopeek_predicate()*
336
+ `MiniCmdline.default_autopeek_predicate`({data}, {opts})
337
+ Default autopeek predicate
338
+
339
+ Parameters ~
340
+ {data} `(table)` Input autopeek data. As described in |MiniCmdline.config|.
341
+ {opts} `(table|nil)` Options. Reserved for future use.
342
+
343
+ Return ~
344
+ `(boolean)` If command defines |:command-preview| - `false`, otherwise - `true`.
345
+ This makes autopeek easier to use for commands like |:substitute|,
346
+ especially if |'inccommand'| is set to `split`.
347
+
348
+ ------------------------------------------------------------------------------
349
+ *MiniCmdline.default_autopeek_statuscolumn()*
350
+ `MiniCmdline.default_autopeek_statuscolumn`({data}, {opts})
351
+ Default autopeek statuscolumn
352
+
353
+ - Show signs next to lines depending on their relation to peeked range.
354
+ Highlighted with `MiniCmdlinePeekSign` group.
355
+ - Show line numbers for left and right parts of the range.
356
+ Highlighted with `MiniCmdlinePeekLineNr` group.
357
+ - Separate statuscolumn and buffer text with dedicated separator character.
358
+ Highlighted with `MiniCmdlinePeekSep` group.
359
+
360
+ Notes:
361
+ - Intended to only be used as a part of |'statuscolumn'| function, as it
362
+ uses |v:lnum| and |v:virtnum| to compute the output.
363
+
364
+ Example of adjusting a `mid` sign: >lua
365
+
366
+ local peek_stc_opts = { signs = { mid = '+' } }
367
+ local peek_stc = function(data)
368
+ return MiniCmdline.default_autopeek_statuscolumn(data, peek_stc_opts)
369
+ end
370
+ require('mini.cmdline').setup({
371
+ autopeek = { window = { statuscolumn = peek_stc } },
372
+ })
373
+ <
374
+ Parameters ~
375
+ {data} `(table)` Input peek data. As described in |MiniCmdline.config|.
376
+ {opts} `(table|nil)` Options. Possible fields:
377
+ - <signs> `(table)` - signs to show. Possible fields:
378
+ - <same> `(string)` - on range if `left=right`. Default: `'🭬'`.
379
+ - <left> `(string)` - on `left` line. Default: `'┌'`.
380
+ - <mid> `(string)` - inside range. Default: `'┊'`.
381
+ - <right> `(string)` - on `right` line. Default: `'└'`.
382
+ - <out> `(string)` - outside of range. Default: `''` (no sign).
383
+ - <virt> `(string)` - virtual line. Default: `'•'`.
384
+ - <wrap> `(string)` - wrapped line. Default: `'↳'`.
385
+ - <sep> `(string)` - string to put at the end to separate statuscolumn and
386
+ buffer text. Default: `'│'`
387
+
388
+ Note: Any sign and separator should have every `%` escaped as `%%` (due to its
389
+ special meaning in |'statuscolumn'|).
390
+
391
+
392
+ vim:tw=78:ts=8:noet:ft=help:norl: