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,525 @@
1
+ *mini.jump2d* Jump within visible lines
2
+
3
+ MIT License Copyright (c) 2022 Evgeni Chasnovski
4
+
5
+ ------------------------------------------------------------------------------
6
+ *MiniJump2d*
7
+ Jump within visible lines via iterative label filtering.
8
+
9
+ Features:
10
+ - Make jump by iterative filtering of possible, equally considered jump
11
+ spots until there is only one. Filtering is done by typing a label
12
+ character that is visualized at jump spot.
13
+
14
+ - Customizable (see |MiniJump2d.config|):
15
+ - Way of computing possible jump spots with opinionated default.
16
+ - Characters used to label jump spots during iterative filtering.
17
+ - Visual effects: how many steps ahead to show; dim lines with spots.
18
+ - Action hooks to be executed at certain events during jump.
19
+ - Allowed windows: current and/or not current.
20
+ - Allowed lines: whether to process blank or folded lines, lines
21
+ before/at/after cursor line, etc. Example: user can configure to look
22
+ for spots only inside current window at or after cursor line.
23
+ Example: user can configure to look for word starts only inside current
24
+ window at or after cursor line with `j` and `k` labels performing some
25
+ action after jump.
26
+
27
+ - Works in Visual and Operator-pending (with dot-repeat) modes.
28
+
29
+ - Preconfigured ways of computing jump spots (see |MiniJump2d.builtin_opts|):
30
+ - Starts of lines.
31
+ - Starts of words.
32
+ - Single character from user input.
33
+ - Variable length query from user input.
34
+
35
+ - Works with multibyte characters.
36
+
37
+ General overview of how jump is intended to be performed:
38
+ - Lock eyes on desired location ("spot") recognizable by future jump.
39
+ Should be within visible lines at place where cursor can be placed.
40
+
41
+ - Initiate jump. Either by custom keybinding or with a call to
42
+ |MiniJump2d.start()| (allows customization options). This will highlight
43
+ all possible jump spots with their labels (letters from "a" to "z" by
44
+ default). For more details, read |MiniJump2d.start()| and |MiniJump2d.config|.
45
+
46
+ - Type character that appeared over desired location. If its label was
47
+ unique, jump is performed. If it wasn't unique, possible jump spots are
48
+ filtered to those having the same label character.
49
+
50
+ - Repeat previous step until there is only one possible jump spot or type <CR>
51
+ to jump to first available jump spot. Typing anything else stops jumping
52
+ without moving cursor.
53
+
54
+ # Setup ~
55
+
56
+ This module needs a setup with `require('mini.jump2d').setup({})` (replace
57
+ `{}` with your `config` table). It will create global Lua table
58
+ `MiniJump2d` which you can use for scripting or manually (with
59
+ `:lua MiniJump2d.*`).
60
+
61
+ See |MiniJump2d.config| for available config settings.
62
+
63
+ You can override runtime config settings locally to buffer inside
64
+ `vim.b.minijump2d_config` which should have same structure as
65
+ `MiniJump2d.config`. See |mini.nvim-buffer-local-config| for more details.
66
+
67
+ To stop module from showing non-error feedback, set `config.silent = true`.
68
+
69
+ # Example usage ~
70
+
71
+ - Modify default jumping to use only current window at or after cursor line: >lua
72
+
73
+ require('mini.jump2d').setup({
74
+ allowed_lines = { cursor_before = false },
75
+ allowed_windows = { not_current = false },
76
+ })
77
+ <
78
+ - Jump to line start using combination of options supplied in
79
+ |MiniJump2d.config| and |MiniJump2d.builtin_opts.line_start|: >vim
80
+
81
+ :lua MiniJump2d.start(MiniJump2d.builtin_opts.line_start)
82
+ <
83
+ - Jump to a single character typed after executing this command: >vim
84
+
85
+ :lua MiniJump2d.start(MiniJump2d.builtin_opts.single_character)
86
+ <
87
+ - See more examples in |MiniJump2d.start()| and |MiniJump2d.builtin_opts|.
88
+
89
+ # Comparisons ~
90
+
91
+ - [phaazon/hop.nvim](https://github.com/phaazon/hop.nvim):
92
+ - Both are fast, customizable, and extensible (user can write their own
93
+ ways to define jump spots).
94
+ - `hop.nvim` visualizes all steps at once. While this module can show
95
+ configurable number of steps ahead.
96
+ - Both have several builtin ways to specify type of jump (word start,
97
+ line start, one character or query based on user input). `hop.nvim`
98
+ does that by exporting many targeted Neovim commands, while this
99
+ module has preconfigured basic options leaving others to
100
+ customization with Lua code (see |MiniJump2d.builtin_opts|).
101
+ - `hop.nvim` computes labels (called "hints") differently. Contrary to
102
+ this module deliberately not having preference of one jump spot over
103
+ another, `hop.nvim` uses specialized algorithm that produces sequence
104
+ of keys in a slightly biased manner: some sequences are intentionally
105
+ shorter than the others (leading to fewer average keystrokes). They
106
+ are put near cursor (by default) and highlighted differently. Final
107
+ order of sequences is based on distance to the cursor.
108
+ - |mini.jump2d| has opinionated default algorithm of computing jump
109
+ spots. See |MiniJump2d.default_spotter()|.
110
+
111
+ # Highlight groups ~
112
+ *MiniJump2d-hl-groups*
113
+
114
+ - `MiniJump2dSpot` - highlighting of jump spot's next step. By default it
115
+ uses label with highest contrast while not being too visually demanding:
116
+ white on black for dark |'background'|, black on white for light. If it
117
+ doesn't suit your liking, try couple of these alternatives (or choose
118
+ your own, of course): >lua
119
+
120
+ -- Reverse underlying colors (mostly *very* visible in any colorscheme)
121
+ vim.api.nvim_set_hl(0, 'MiniJump2dSpot', { reverse = true })
122
+
123
+ -- Bold italic
124
+ vim.api.nvim_set_hl(0, 'MiniJump2dSpot', { bold = true, italic = true })
125
+
126
+ -- Red undercurl
127
+ vim.api.nvim_set_hl(0, 'MiniJump2dSpot', { sp = 'Red', undercurl = true })
128
+ <
129
+ - `MiniJump2dSpotUnique` - highlighting of jump spot's next step if it has
130
+ unique label. By default links to `MiniJump2dSpot`.
131
+
132
+ - `MiniJump2dSpotAhead` - highlighting of jump spot's future steps. By default
133
+ similar to `MiniJump2dSpot` but with less contrast and visibility.
134
+
135
+ - `MiniJump2dDim` - highlighting of lines with at least one jump spot.
136
+ Make it non-bright in order for jump spot labels to be more visible.
137
+ By default linked to `Comment` highlight group.
138
+
139
+ To change any highlight group, set it directly with |nvim_set_hl()|.
140
+
141
+ # Disabling ~
142
+
143
+ To disable, set `vim.g.minijump2d_disable` (globally) or
144
+ `vim.b.minijump2d_disable` (for a buffer) to `true`. Considering high
145
+ number of different scenarios and customization intentions, writing exact
146
+ rules for disabling module's functionality is left to user. See
147
+ |mini.nvim-disabling-recipes| for common recipes.
148
+
149
+ ------------------------------------------------------------------------------
150
+ *MiniJump2d.setup()*
151
+ `MiniJump2d.setup`({config})
152
+ Module setup
153
+
154
+ Parameters ~
155
+ {config} `(table|nil)` Module config table. See |MiniJump2d.config|.
156
+
157
+ Usage ~
158
+ >lua
159
+ require('mini.jump2d').setup() -- use default config
160
+ -- OR
161
+ require('mini.jump2d').setup({}) -- replace {} with your config table
162
+ <
163
+ ------------------------------------------------------------------------------
164
+ *MiniJump2d.config*
165
+ `MiniJump2d.config`
166
+ Defaults ~
167
+ >lua
168
+ MiniJump2d.config = {
169
+ -- Function producing jump spots (byte indexed) for a particular line.
170
+ -- For more information see |MiniJump2d.start()|.
171
+ -- If `nil` (default) - use |MiniJump2d.default_spotter()|
172
+ spotter = nil,
173
+
174
+ -- Characters used for labels of jump spots (in supplied order)
175
+ labels = 'abcdefghijklmnopqrstuvwxyz',
176
+
177
+ -- Options for visual effects
178
+ view = {
179
+ -- Whether to dim lines with at least one jump spot
180
+ dim = false,
181
+
182
+ -- How many steps ahead to show. Set to big number to show all steps.
183
+ n_steps_ahead = 0,
184
+ },
185
+
186
+ -- Which lines are used for computing spots
187
+ allowed_lines = {
188
+ blank = true, -- Blank line (not sent to spotter even if `true`)
189
+ cursor_before = true, -- Lines before cursor line
190
+ cursor_at = true, -- Cursor line
191
+ cursor_after = true, -- Lines after cursor line
192
+ fold = true, -- Start of fold (not sent to spotter even if `true`)
193
+ },
194
+
195
+ -- Which windows from current tabpage are used for visible lines
196
+ allowed_windows = {
197
+ current = true,
198
+ not_current = true,
199
+ },
200
+
201
+ -- Functions to be executed at certain events
202
+ hooks = {
203
+ before_start = nil, -- Before jump start
204
+ after_jump = nil, -- After jump was actually done
205
+ },
206
+
207
+ -- Module mappings. Use `''` (empty string) to disable one.
208
+ mappings = {
209
+ start_jumping = '<CR>',
210
+ },
211
+
212
+ -- Whether to disable showing non-error feedback
213
+ -- This also affects (purely informational) helper messages shown after
214
+ -- idle time if user input is required.
215
+ silent = false,
216
+ }
217
+ <
218
+ # Spotter function ~
219
+
220
+ Actual computation of possible jump spots is done through spotter function.
221
+ It should have the following arguments:
222
+ - `line_num` is a line number inside buffer.
223
+ - `args` - table with additional arguments:
224
+ - {win_id} - identifier of a window where input line number is from.
225
+ - {win_id_init} - identifier of a window which was current when
226
+ `MiniJump2d.start()` was called.
227
+
228
+ Its output is a list of byte-indexed positions that should be considered as
229
+ possible jump spots for this particular line in this particular window.
230
+ Note: for a more aligned visualization this list should be (but not
231
+ strictly necessary) sorted increasingly.
232
+
233
+ Note: spotter function is always called with `win_id` window being
234
+ "temporary current" (see |nvim_win_call()|). This allows using builtin
235
+ Vimscript functions that operate only inside current window.
236
+
237
+ # View ~
238
+
239
+ Option `view.n_steps_ahead` controls how many steps ahead to show along
240
+ with the currently required label. Those future steps are shown with
241
+ different (less visible) highlight group ("MiniJump2dSpotAhead"). Usually
242
+ it is a good idea to use this with a spotter which doesn't result into many
243
+ jump spots (like, for example, |MiniJump2d.builtin_opts.word_start|).
244
+ Default is 0 to not show anything ahead as it reduces visual noise.
245
+
246
+ Option `view.dim` controls whether to dim lines with at least one jump spot.
247
+ Dimming is done by applying "MiniJump2dDim" highlight group to the whole line.
248
+
249
+ # Allowed lines ~
250
+
251
+ Option `allowed_lines` controls which lines will be used for computing
252
+ possible jump spots:
253
+ - If `blank` or `fold` is `true`, it is possible to jump to first column of blank
254
+ line (determined by |prevnonblank()|) or first folded one (determined by
255
+ |foldclosed()|) respectively. Otherwise they are skipped. These lines are
256
+ not processed by spotter function even if the option is `true`.
257
+ - If `cursor_before`, (`cursor_at`, `cursor_after`) is `true`, lines before
258
+ (at, after) cursor line of all processed windows are forwarded to spotter
259
+ function. Otherwise, they don't. This allows control of jump "direction".
260
+
261
+ # Hooks ~
262
+
263
+ Following hook functions can be used to further tweak jumping experience:
264
+ - `before_start` - called without arguments first thing when jump starts.
265
+ One of the possible use cases is to ask for user input and update spotter
266
+ function with it.
267
+ - `after_jump` - called after jump was actually done. Useful to make
268
+ post-adjustments (like move cursor to first non-whitespace character).
269
+
270
+ ------------------------------------------------------------------------------
271
+ *MiniJump2d.start()*
272
+ `MiniJump2d.start`({opts})
273
+ Start jumping
274
+
275
+ Compute possible jump spots, visualize them and wait for iterative filtering.
276
+
277
+ # First computation of possible jump spots ~
278
+
279
+ - Process allowed windows (current and/or not current; controlled by
280
+ `allowed_windows` option) by visible lines from top to bottom. For each
281
+ one see if it is allowed (controlled by `allowed_lines` option). If not
282
+ allowed, then do nothing. If allowed and should be processed by
283
+ `spotter`, process it.
284
+ - Apply spotter function from `spotter` option for each appropriate line
285
+ and concatenate outputs. This means that eventual order of jump spots
286
+ aligns with lexicographical order within "window id" - "line number" -
287
+ "position in `spotter` output" tuples.
288
+ - For each possible jump compute its label: a single character from
289
+ `labels` option used to filter jump spots. Each possible label character
290
+ might be used more than once to label several "consecutive" jump spots.
291
+ It is done in an optimal way under assumption of no preference of one
292
+ spot over another. Basically, it means "use all labels at each step of
293
+ iterative filtering as equally as possible".
294
+
295
+ # Visualization ~
296
+
297
+ Current label for each possible jump spot is shown at that position
298
+ overriding everything underneath it.
299
+
300
+ # Iterative filtering ~
301
+
302
+ Labels of possible jump spots are computed in order to use them as equally
303
+ as possible.
304
+
305
+ Example:
306
+ - With `abc` as `labels` option, initial labels for 10 possible jumps
307
+ are "aaaabbbccc". As there are 10 spots which should be "coded" with 3
308
+ symbols, at least 2 symbols need 3 steps to filter them out. With current
309
+ implementation those are always the "first ones".
310
+ - After typing `a`, it filters first four jump spots and recomputes its
311
+ labels to be "aabc".
312
+ - After typing `a` again, it filters first two spots and recomputes its
313
+ labels to be "ab".
314
+ - After typing either `a` or `b` it filters single spot and makes jump.
315
+
316
+ With default 26 labels for most real-world cases 2 steps is enough for
317
+ default spotter function. Rarely 3 steps are needed with several windows.
318
+
319
+ Parameters ~
320
+ {opts} `(table|nil)` Configuration of jumping, overriding global and buffer
321
+ local values. Has the same structure as |MiniJump2d.config|
322
+ without <mappings> field. Extra allowed fields:
323
+ - <hl_group> - highlight group for first step.
324
+ Default: `"MiniJump2dSpot"`.
325
+ - <hl_group_ahead> - highlight group for second and later steps.
326
+ Default: `"MiniJump2dSpotAhead"`.
327
+ - <hl_group_dim> - highlight group for dimming used lines.
328
+ Default: `"MiniJump2dDim"`.
329
+ - <hl_group_unique> - highlight group for unique next step.
330
+ Default: `"MiniJump2dSpotUnique"`.
331
+
332
+ Usage ~
333
+ >lua
334
+ -- Start default jumping
335
+ MiniJump2d.start()
336
+
337
+ -- Jump to word start
338
+ MiniJump2d.start(MiniJump2d.builtin_opts.word_start)
339
+
340
+ -- Jump to single character from user input (follow by typing one character)
341
+ MiniJump2d.start(MiniJump2d.builtin_opts.single_character)
342
+
343
+ -- Jump to first character of punctuation group only inside current window
344
+ -- which is placed at cursor line; visualize with `Search`
345
+ MiniJump2d.start({
346
+ spotter = MiniJump2d.gen_spotter.pattern('%p+'),
347
+ allowed_lines = { cursor_before = false, cursor_after = false },
348
+ allowed_windows = { not_current = false },
349
+ hl_group = 'Search'
350
+ })
351
+ <
352
+ See also ~
353
+ |MiniJump2d.config|
354
+
355
+ ------------------------------------------------------------------------------
356
+ *MiniJump2d.stop()*
357
+ `MiniJump2d.stop`()
358
+ Stop jumping
359
+
360
+ ------------------------------------------------------------------------------
361
+ *MiniJump2d.gen_spotter*
362
+ `MiniJump2d.gen_spotter`
363
+ Generate spotter
364
+
365
+ This is a table with function elements. Call to actually get a spotter.
366
+
367
+ ------------------------------------------------------------------------------
368
+ *MiniJump2d.gen_spotter.pattern()*
369
+ `MiniJump2d.gen_spotter.pattern`({pattern}, {side})
370
+ Generate spotter for Lua pattern
371
+
372
+ Parameters ~
373
+ {pattern} `(string|nil)` Lua pattern. Default: `'[^%s%p]+'` which matches group
374
+ of "non-whitespace non-punctuation characters" (basically a way of saying
375
+ "group of alphanumeric characters" that works with multibyte characters).
376
+ {side} `(string|nil)` Which side of pattern match should be considered as
377
+ jumping spot. Should be one of `'start'` (start of match, default), `'end'`
378
+ (inclusive end of match), or `'none'` (match for spot is done manually
379
+ inside pattern with plain `()` matching group).
380
+
381
+ Return ~
382
+ `(function)` Spotter function.
383
+
384
+ Usage ~
385
+ >lua
386
+ -- Match any punctuation
387
+ MiniJump2d.gen_spotter.pattern('%p')
388
+
389
+ -- Match first from line start non-whitespace character
390
+ MiniJump2d.gen_spotter.pattern('^%s*%S', 'end')
391
+
392
+ -- Match start of last word
393
+ MiniJump2d.gen_spotter.pattern('[^%s%p]+[%s%p]-$', 'start')
394
+
395
+ -- Match letter followed by another letter (example of manual matching
396
+ -- inside pattern)
397
+ MiniJump2d.gen_spotter.pattern('%a()%a', 'none')
398
+ <
399
+ ------------------------------------------------------------------------------
400
+ *MiniJump2d.gen_spotter.vimpattern()*
401
+ `MiniJump2d.gen_spotter.vimpattern`({pattern})
402
+ Generate spotter for Vimscript pattern
403
+
404
+ Parameters ~
405
+ {pattern} `(string|nil)` Vimscript |pattern|. Default: `\k\+` to match group
406
+ of "keyword characters" (see |'iskeyword'|).
407
+
408
+ Return ~
409
+ `(function)` Spotter function.
410
+
411
+ Usage ~
412
+ >lua
413
+ -- Match start of a keyword
414
+ MiniJump2d.gen_spotter.vimpattern('\\k\\+')
415
+
416
+ -- Match end of a keyword
417
+ MiniJump2d.gen_spotter.vimpattern('\\k*\\zs\\k')
418
+ <
419
+ ------------------------------------------------------------------------------
420
+ *MiniJump2d.gen_spotter.union()*
421
+ `MiniJump2d.gen_spotter.union`({...})
422
+ Generate union of spotters
423
+
424
+ Parameters ~
425
+ {...} `(any)` Each argument should be a valid spotter.
426
+ See |MiniJump2d.config| for more details.
427
+
428
+ Return ~
429
+ `(function)` Spotter producing union of spots.
430
+
431
+ Usage ~
432
+ >lua
433
+ -- Match start and end of non-blank character groups:
434
+ local nonblank_start = MiniJump2d.gen_spotter.pattern('%S+', 'start')
435
+ local nonblank_end = MiniJump2d.gen_spotter.pattern('%S+', 'end')
436
+ local spotter = MiniJump2d.gen_spotter.union(nonblank_start, nonblank_end)
437
+ <
438
+ ------------------------------------------------------------------------------
439
+ *MiniJump2d.default_spotter()*
440
+ `MiniJump2d.default_spotter`
441
+ Default spotter function
442
+
443
+ Spot is possible for jump if it is one of the following:
444
+ - Start or end of non-whitespace character group.
445
+ - Alphanumeric character followed or preceded by punctuation (useful for
446
+ snake case names).
447
+ - Start of uppercase character group (useful for camel case names). Usually
448
+ only Latin alphabet is recognized due to Lua patterns shortcomings.
449
+
450
+ These rules are derived in an attempt to balance between two intentions:
451
+ - Allow as much useful jumping spots as possible.
452
+ - Make labeled jump spots easily distinguishable.
453
+
454
+ Usually takes from 2 to 3 keystrokes to get to destination.
455
+
456
+ ------------------------------------------------------------------------------
457
+ *MiniJump2d.builtin_opts*
458
+ `MiniJump2d.builtin_opts`
459
+ Table with builtin `opts` values for |MiniJump2d.start()|
460
+
461
+ Each element of table is itself a table defining one or several options for
462
+ `MiniJump2d.start()`. Read help description to see which options it defines
463
+ (like in |MiniJump2d.builtin_opts.line_start|).
464
+
465
+ Usage ~
466
+ >lua
467
+ -- Using `MiniJump2d.builtin_opts.line_start` as example:
468
+ -- Command
469
+ :lua MiniJump2d.start(MiniJump2d.builtin_opts.line_start)
470
+
471
+ -- Custom mapping
472
+ vim.keymap.set(
473
+ 'n', '<CR>',
474
+ '<Cmd>lua MiniJump2d.start(MiniJump2d.builtin_opts.line_start)<CR>'
475
+ )
476
+
477
+ -- Inside `MiniJump2d.setup()` (make sure to use all defined options)
478
+ local jump2d = require('mini.jump2d')
479
+ local jump_line_start = jump2d.builtin_opts.line_start
480
+ jump2d.setup({
481
+ spotter = jump_line_start.spotter,
482
+ hooks = { after_jump = jump_line_start.hooks.after_jump }
483
+ })
484
+ <
485
+ ------------------------------------------------------------------------------
486
+ *MiniJump2d.builtin_opts.default*
487
+ `MiniJump2d.builtin_opts.default`
488
+ Jump with |MiniJump2d.default_spotter()|
489
+
490
+ Defines `spotter`.
491
+
492
+ ------------------------------------------------------------------------------
493
+ *MiniJump2d.builtin_opts.line_start*
494
+ `MiniJump2d.builtin_opts.line_start`
495
+ Jump to line start
496
+
497
+ Defines `spotter` and `hooks.after_jump`.
498
+
499
+ ------------------------------------------------------------------------------
500
+ *MiniJump2d.builtin_opts.word_start*
501
+ `MiniJump2d.builtin_opts.word_start`
502
+ Jump to word start
503
+
504
+ Respects |'iskeyword'| when computing word start.
505
+
506
+ Defines `spotter`.
507
+
508
+ ------------------------------------------------------------------------------
509
+ *MiniJump2d.builtin_opts.single_character*
510
+ `MiniJump2d.builtin_opts.single_character`
511
+ Jump to single character taken from user input
512
+
513
+ Defines `spotter`, `allowed_lines.blank`, `allowed_lines.fold`, and
514
+ `hooks.before_start`.
515
+
516
+ ------------------------------------------------------------------------------
517
+ *MiniJump2d.builtin_opts.query*
518
+ `MiniJump2d.builtin_opts.query`
519
+ Jump to query taken from user input
520
+
521
+ Defines `spotter`, `allowed_lines.blank`, `allowed_lines.fold`, and
522
+ `hooks.before_start`.
523
+
524
+
525
+ vim:tw=78:ts=8:noet:ft=help:norl: