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,115 @@
1
+ # Perform local sync of standalone repositories, but only if on `main` branch
2
+ branch="$( git symbolic-ref --short HEAD )"
3
+ if [[ $branch != "main" ]]
4
+ then
5
+ printf "\nDo sync only for 'main' branch, not '$branch'\n\n"
6
+ exit 2
7
+ fi
8
+
9
+ repos_dir=dual/repos
10
+ patches_dir=dual/patches
11
+
12
+ mkdir -p $repos_dir
13
+ mkdir -p $patches_dir
14
+
15
+ sync_module () {
16
+ # First argument is a string with module name. Others - extra paths to track
17
+ # for module.
18
+ module=$1
19
+ shift
20
+
21
+ repo="$( realpath $repos_dir/mini.$module )"
22
+ patch="$( realpath $patches_dir/mini.$module.patch )"
23
+
24
+ # Make patch with commits from 'sync' branch to current HEAD which affect
25
+ # files related to the module
26
+ git format-patch sync..HEAD --output $patch -- \
27
+ lua/mini/$module.lua \
28
+ doc/mini-$module.txt \
29
+ readmes/mini-$module.md \
30
+ LICENSE \
31
+ $@
32
+
33
+ # Do nothing if patch is empty
34
+ if [[ ! -s $patch ]]
35
+ then
36
+ rm $patch
37
+ # Return early to skip unnecessary repo pull (saves time)
38
+ return
39
+ fi
40
+
41
+ printf "\n\033[1mmini.$module\033[0m\n"
42
+
43
+ # Tweak patch:
44
+ # - Move 'readmes/mini-xxx.md' to 'README.md'. This should modify only patch
45
+ # metadata, and not text (assuming it uses 'readmes/mini-xxx.md' on
46
+ # purpose; as in "use [this link](https://.../readmes/mini-xxx.md)").
47
+ sed -i "s/readmes\/mini-$module\.md\([^)]\)/README.md\\1/" $patch
48
+ sed -i "s/readmes\/mini-$module\.md$/README.md/" $patch
49
+ # - Move all known relative links one step higher (and hope that it doesn't
50
+ # occur anywhere else in patch). NOTE: There can be other relative links
51
+ # which should be corrected manually
52
+ sed -i "s/\[Documentation\](\.\.\/doc/[Documentation](doc/" $patch
53
+
54
+ # Possibly pull repository
55
+ if [[ ! -d $repo ]]
56
+ then
57
+ printf "Pulling\n"
58
+ # Handle 'mini.git' differently because GitHub repo is named 'mini-git'
59
+ # (".git" suffix is not allowed as repo name on GitHub)
60
+ if [ $module = "git" ]; then github_repo="mini-git"; else github_repo="mini.$module"; fi
61
+ git clone --filter=blob:none https://github.com/nvim-mini/$github_repo.git $repo >/dev/null 2>&1
62
+ fi
63
+
64
+ # Apply patch
65
+ printf "Applying patch\n"
66
+ cd $repo > /dev/null
67
+ git am $patch
68
+ cd - > /dev/null
69
+ }
70
+
71
+ sync_module "ai"
72
+ sync_module "align"
73
+ sync_module "animate"
74
+ sync_module "base16" colors/minischeme.lua colors/minicyan.lua
75
+ sync_module "basics"
76
+ sync_module "bracketed"
77
+ sync_module "bufremove"
78
+ sync_module "clue"
79
+ sync_module "cmdline"
80
+ sync_module "colors"
81
+ sync_module "comment"
82
+ sync_module "completion"
83
+ sync_module "cursorword"
84
+ sync_module "deps" scripts/init-deps-example.lua
85
+ sync_module "diff"
86
+ sync_module "doc"
87
+ sync_module "extra"
88
+ sync_module "files"
89
+ sync_module "fuzzy"
90
+ sync_module "git"
91
+ sync_module "hipatterns"
92
+ sync_module "hues" colors/miniwinter.lua colors/minispring.lua colors/minisummer.lua colors/miniautumn.lua colors/randomhue.lua
93
+ sync_module "icons"
94
+ sync_module "indentscope"
95
+ sync_module "input"
96
+ sync_module "jump"
97
+ sync_module "jump2d"
98
+ sync_module "keymap"
99
+ sync_module "map"
100
+ sync_module "misc"
101
+ sync_module "move"
102
+ sync_module "notify"
103
+ sync_module "operators"
104
+ sync_module "pairs"
105
+ sync_module "pick"
106
+ sync_module "sessions"
107
+ sync_module "snippets"
108
+ sync_module "splitjoin"
109
+ sync_module "starter"
110
+ sync_module "statusline"
111
+ sync_module "surround"
112
+ sync_module "tabline"
113
+ sync_module "test"
114
+ sync_module "trailspace"
115
+ sync_module "visits"
@@ -0,0 +1,59 @@
1
+ -- Clone 'mini.nvim' manually in a way that it gets managed by 'mini.deps'
2
+ local path_package = vim.fn.stdpath('data') .. '/site/'
3
+ local mini_path = path_package .. 'pack/deps/start/mini.nvim'
4
+ if not vim.loop.fs_stat(mini_path) then
5
+ vim.cmd('echo "Installing `mini.nvim`" | redraw')
6
+ local clone_cmd = { 'git', 'clone', '--filter=blob:none', 'https://github.com/nvim-mini/mini.nvim', mini_path }
7
+ vim.fn.system(clone_cmd)
8
+ vim.cmd('packadd mini.nvim | helptags ALL')
9
+ vim.cmd('echo "Installed `mini.nvim`" | redraw')
10
+ end
11
+
12
+ -- Set up 'mini.deps' (customize to your liking)
13
+ require('mini.deps').setup({ path = { package = path_package } })
14
+
15
+ -- Use 'mini.deps'. `now()` and `later()` are helpers for a safe two-stage
16
+ -- startup and are optional.
17
+ local add, now, later = MiniDeps.add, MiniDeps.now, MiniDeps.later
18
+
19
+ -- Safely execute immediately
20
+ now(function()
21
+ vim.o.termguicolors = true
22
+ vim.cmd('colorscheme miniwinter')
23
+ end)
24
+ now(function() require('mini.notify').setup() end)
25
+ now(function() require('mini.icons').setup() end)
26
+ now(function() require('mini.tabline').setup() end)
27
+ now(function() require('mini.statusline').setup() end)
28
+
29
+ -- Safely execute later
30
+ later(function() require('mini.ai').setup() end)
31
+ later(function() require('mini.comment').setup() end)
32
+ later(function() require('mini.pick').setup() end)
33
+ later(function() require('mini.surround').setup() end)
34
+
35
+ now(function()
36
+ -- Use other plugins with `add()`. It ensures plugin is available in current
37
+ -- session (installs if absent)
38
+ add({
39
+ source = 'neovim/nvim-lspconfig',
40
+ -- Supply dependencies near target plugin
41
+ depends = { 'williamboman/mason.nvim' },
42
+ })
43
+ end)
44
+
45
+ later(function()
46
+ add({
47
+ source = 'nvim-treesitter/nvim-treesitter',
48
+ -- Use 'master' while monitoring updates in 'main'
49
+ checkout = 'master',
50
+ monitor = 'main',
51
+ -- Perform action after every checkout
52
+ hooks = { post_checkout = function() vim.cmd('TSUpdate') end },
53
+ })
54
+ -- Possible to immediately execute code which depends on the added plugin
55
+ require('nvim-treesitter.configs').setup({
56
+ ensure_installed = { 'lua', 'vimdoc' },
57
+ highlight = { enable = true },
58
+ })
59
+ end)
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # Exact value of maximum length is chosen as a "reasonably high but not bigger
4
+ # than 143 (maximum filename length on eCryptfs systems) number".
5
+ # Having low-ish value also helps with restrictions on full path length.
6
+ max_filename_length=125
7
+
8
+ exit_code=0
9
+ for filename in $(find . -not -path './.git/**' -not -path './dual/**' -printf %f\\n); do
10
+ if [ "${#filename}" -gt $max_filename_length ]; then
11
+ echo "Too long file name: $filename"
12
+ exit_code=1
13
+ fi
14
+ done
15
+
16
+ exit $exit_code
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env bash
2
+
3
+ msg_file_dir='lintcommit-msg-files/'
4
+ mkdir -p $msg_file_dir
5
+ function cleanup {
6
+ rm -rf $msg_file_dir
7
+ }
8
+ trap cleanup EXIT
9
+
10
+ range="${1:-origin/sync..HEAD}"
11
+ msg_files=()
12
+ for commit in $( git rev-list --reverse $range -- ); do \
13
+ file="$msg_file_dir$commit" ; \
14
+ git log -1 --pretty=format:%B $commit > $file ; \
15
+ msg_files+=($file) ; \
16
+ done
17
+
18
+ nvim --headless --noplugin -u ./scripts/lintcommit.lua -- ${msg_files[*]}
@@ -0,0 +1,393 @@
1
+ -- Validate commit message. Designed to be run as pre-commit hook and in CI.
2
+ --
3
+ -- Each Neovim's argument for when it is opened is assumed to be a path to
4
+ -- a file containing commit message to validate
5
+ -- Example usage:
6
+ -- ```
7
+ -- nvim --headless --noplugin -u scripts/lintcommit.lua -- .git/COMMIT_EDITMSG
8
+ -- ```
9
+
10
+ -- Validator functions
11
+ local allowed_commit_types = { 'ci', 'docs', 'feat', 'fix', 'refactor', 'style', 'test' }
12
+
13
+ local allowed_scopes = { 'ALL' }
14
+ for _, module in ipairs(vim.fn.readdir('lua/mini')) do
15
+ if module ~= 'init.lua' then table.insert(allowed_scopes, module:match('^(.+)%.lua$')) end
16
+ end
17
+
18
+ local validate_subject = function(line)
19
+ -- Possibly allow starting with 'fixup' to disable commit linting
20
+ if vim.startswith(line, 'fixup') then
21
+ local is_strict = vim.loop.os_getenv('LINTCOMMIT_STRICT') ~= nil
22
+ local msg = is_strict and 'No "fixup" commits are allowed.' or ''
23
+ return not is_strict, msg
24
+ end
25
+
26
+ -- Should match overall conventional commit spec
27
+ local commit_type, scope, desc = string.match(line, '^([^(]+)(%b())!?: (.+)$')
28
+ if commit_type == nil then
29
+ commit_type, desc = string.match(line, '^([^!:]+)!?: (.+)$')
30
+ end
31
+ if commit_type == nil or desc == nil then
32
+ return false,
33
+ 'First line does not match conventional commit specification of `<type>[optional scope][!]: <description>`: '
34
+ .. vim.inspect(line)
35
+ end
36
+
37
+ -- Commit type should be present and be from one of allowed
38
+ if not vim.tbl_contains(allowed_commit_types, commit_type) then
39
+ local one_of = table.concat(vim.tbl_map(vim.inspect, allowed_commit_types), ', ')
40
+ return false, 'Commit type ' .. vim.inspect(commit_type) .. ' is not allowed. Use one of ' .. one_of .. '.'
41
+ end
42
+
43
+ -- Scope, if present, should be from one of allowed
44
+ if scope ~= nil then
45
+ scope = scope:sub(2, -2)
46
+ if not vim.tbl_contains(allowed_scopes, scope) then
47
+ local one_of = table.concat(vim.tbl_map(vim.inspect, allowed_scopes), ', ')
48
+ return false, 'Scope ' .. vim.inspect(scope) .. ' is not allowed. Use one of ' .. one_of .. '.'
49
+ end
50
+ end
51
+
52
+ -- Description should be present and properly formatted
53
+ if string.find(desc, '^%w') == nil then
54
+ return false, 'Description should start with alphanumeric character: ' .. vim.inspect(desc)
55
+ end
56
+
57
+ if string.find(desc, '^%u%l') ~= nil then
58
+ return false, 'Description should not start with capitalized word: ' .. vim.inspect(desc)
59
+ end
60
+
61
+ if string.find(desc, '[.,?!;]$') ~= nil then
62
+ return false, 'Description should not end with any of `.,?!;`: ' .. vim.inspect(desc)
63
+ end
64
+
65
+ -- Subject should not be too long
66
+ if vim.fn.strdisplaywidth(line) > 72 then
67
+ return false, 'First line is longer than 72 characters: ' .. vim.inspect(desc)
68
+ end
69
+
70
+ return true, nil
71
+ end
72
+
73
+ local is_details = function(line, line_next) return line == 'Details:' and vim.startswith(line_next or '', '- ') end
74
+
75
+ local is_forge_directive = function(line)
76
+ return line:find('^Resolve [%a%p]*#%d+$') ~= nil or line:find('^Related to [%a%p]*#%d+$') ~= nil
77
+ end
78
+
79
+ local is_git_footer = function(line) return vim.startswith(line, 'Co-authored-by: ') end
80
+
81
+ local validate_body = function(parts)
82
+ if #parts == 1 then return true, nil end
83
+
84
+ if parts[2] ~= '' then return false, 'Second line should be empty' end
85
+ if parts[3] == nil then return false, 'If first line is not enough, body should be present' end
86
+ if string.find(parts[3], '^%S') == nil then return false, 'First body line should not start with whitespace.' end
87
+
88
+ local is_good_body_start = is_details(parts[3], parts[4]) or is_forge_directive(parts[3]) or is_git_footer(parts[3])
89
+ if not is_good_body_start then
90
+ local msg = table.concat({
91
+ 'First body line should be one of:',
92
+ '- Details: start with "Details:" and follow with a "- ..." to list extra info about the change.',
93
+ '- Forge directive: "Resolve #XXXX" / "Related to #XXXX" to show which issue/PR/discussion is resolved/related.',
94
+ '- Git footer: "Co-authored-by: " to show commit co-authors.',
95
+ }, '\n')
96
+ return false, msg
97
+ end
98
+
99
+ local details_lnum, forge_lnum, git_lnum
100
+ for i = 3, #parts do
101
+ if vim.fn.strdisplaywidth(parts[i]) > 80 and not vim.startswith(parts[i], 'Co-authored-by:') then
102
+ return false, 'Body line is longer than 80 characters: ' .. vim.inspect(parts[i])
103
+ end
104
+ details_lnum = is_details(parts[i], parts[i + 1]) and i or details_lnum
105
+ forge_lnum = is_forge_directive(parts[i]) and i or forge_lnum
106
+ git_lnum = is_git_footer(parts[i]) and i or git_lnum
107
+ end
108
+
109
+ --stylua: ignore start
110
+ if forge_lnum and details_lnum and forge_lnum < details_lnum then return false, 'Forge directives should go after "Details:"' end
111
+ if git_lnum and details_lnum and git_lnum < details_lnum then return false, 'Git footer should go after "Details:"' end
112
+ if git_lnum and forge_lnum and git_lnum < forge_lnum then return false, 'Git footer should go after forge directives' end
113
+ --stylua: ignore end
114
+
115
+ if string.find(parts[#parts], '^%s*$') ~= nil then return false, 'Body should not end with blank line.' end
116
+
117
+ return true, nil
118
+ end
119
+
120
+ local validate_bad_wording = function(msg)
121
+ local has_fix = msg:find('[Ff]ix [%a%p]*#') or msg:find('[Ff]ixes [%a%p]*#') or msg:find('[Ff]ixed [%a%p]*#')
122
+ local has_bad_close = msg:find('[Cc]lose[sd]? #') ~= nil
123
+ local has_bad_resolve = msg:find('[Rr]esolve[sd] #') ~= nil
124
+ if has_fix or has_bad_close or has_bad_resolve then
125
+ return false,
126
+ 'Use "Resolve #" Git forge directive to resolve issue/PR '
127
+ .. '(not "Fix(/es/ed)", not "Close(/s/d)", not "Resolve(s/d)").'
128
+ end
129
+ return true, nil
130
+ end
131
+
132
+ local remove_cleanup_lines = function(lines)
133
+ -- Remove lines which are assumed to be later cleaned up by Git itself
134
+ -- See `git help commit` for option `--cleanup` (assumes default value)
135
+ local res = {}
136
+ for _, l in ipairs(lines) do
137
+ -- Ignore anything past and including scissors line
138
+ if l == '# ------------------------ >8 ------------------------' then break end
139
+ -- Ignore comments
140
+ if l:find('^%s*#') == nil then table.insert(res, l) end
141
+ end
142
+
143
+ -- Ignore trailing blank lines
144
+ for i = #res, 1, -1 do
145
+ if res[i]:find('%S') ~= nil then break end
146
+ res[i] = nil
147
+ end
148
+
149
+ return res
150
+ end
151
+
152
+ local validate_commit_msg = function(lines)
153
+ local is_valid, err_msg
154
+
155
+ -- If not in strict context, ignore lines which will be later cleaned up
156
+ local is_strict = vim.loop.os_getenv('LINTCOMMIT_STRICT') ~= nil
157
+ if not is_strict then lines = remove_cleanup_lines(lines) end
158
+
159
+ -- Allow all lines to be empty to abort committing
160
+ local all_empty = true
161
+ for _, l in ipairs(lines) do
162
+ if l ~= '' then all_empty = false end
163
+ end
164
+ if all_empty then return true, nil end
165
+
166
+ -- Validate subject (first line)
167
+ is_valid, err_msg = validate_subject(lines[1])
168
+ if not is_valid then return is_valid, err_msg end
169
+
170
+ -- Validate body
171
+ is_valid, err_msg = validate_body(lines)
172
+ if not is_valid then return is_valid, err_msg end
173
+
174
+ -- No validation for footer
175
+
176
+ -- Should not contain bad wording
177
+ for _, l in ipairs(lines) do
178
+ is_valid, err_msg = validate_bad_wording(l)
179
+ if not is_valid then return is_valid, err_msg end
180
+ end
181
+
182
+ return true, nil
183
+ end
184
+
185
+ local validate_commit_msg_from_file = function(path)
186
+ local ok, lines = pcall(vim.fn.readfile, path)
187
+ if not ok then return false, 'Could not read file ' .. path end
188
+ return validate_commit_msg(lines)
189
+ end
190
+
191
+ -- Actual validation
192
+ local exit_code = 0
193
+ for i = 0, vim.fn.argc(-1) - 1 do
194
+ local path = vim.fn.argv(i, -1)
195
+ io.write('Commit message of ' .. vim.fn.fnamemodify(path, ':t') .. ':\n')
196
+ local is_valid, err_msg = validate_commit_msg_from_file(path)
197
+ io.write((is_valid and 'OK' or err_msg) .. '\n\n')
198
+ if not is_valid then exit_code = 1 end
199
+ end
200
+
201
+ os.exit(exit_code)
202
+
203
+ -- Tests to be run interactively: `_G.test_cases_failed` should be empty.
204
+ -- NOTE: Comment out previous `os.exit()` call
205
+ local test_cases = {
206
+ -- Subject
207
+ ['fixup'] = true,
208
+ ['fixup: commit message'] = true,
209
+ ['fixup! commit message'] = true,
210
+
211
+ ['ci: normal message'] = true,
212
+ ['docs: normal message'] = true,
213
+ ['feat: normal message'] = true,
214
+ ['fix: normal message'] = true,
215
+ ['refactor: normal message'] = true,
216
+ ['style: normal message'] = true,
217
+ ['test: normal message'] = true,
218
+
219
+ ['feat(ai): message with scope'] = true,
220
+ ['feat!: message with breaking change'] = true,
221
+ ['feat(ai)!: message with scope and breaking change'] = true,
222
+ ['style(ALL): style all modules'] = true,
223
+
224
+ ['unknown: unknown type'] = false,
225
+ ['feat(unknown): unknown scope'] = false,
226
+ ['refactor(): empty scope'] = false,
227
+ ['ci( ): whitespace as scope'] = false,
228
+
229
+ ['ci no colon after type'] = false,
230
+ [': no type before colon 1'] = false,
231
+ [' : no type before colon 2'] = false,
232
+ [' : no type before colon 3'] = false,
233
+ ['ci:'] = false,
234
+ ['ci: '] = false,
235
+ ['ci: '] = false,
236
+
237
+ ['feat: message with : in it'] = true,
238
+ ['feat(ai): message with : in it'] = true,
239
+
240
+ ['test: extra space after colon'] = false,
241
+ ['ci: tab after colon'] = false,
242
+ ['ci:no space after colon'] = false,
243
+ ['ci : extra space before colon'] = false,
244
+
245
+ ['ci: bad punctuation at end of sentence.'] = false,
246
+ ['ci: bad punctuation at end of sentence,'] = false,
247
+ ['ci: bad punctuation at end of sentence?'] = false,
248
+ ['ci: bad punctuation at end of sentence!'] = false,
249
+ ['ci: bad punctuation at end of sentence;'] = false,
250
+ ['ci: good punctuation at end of sentence:'] = true,
251
+ ['ci: good punctuation at end of sentence"'] = true,
252
+ ["ci: good punctuation at end of sentence'"] = true,
253
+ ['ci: good punctuation at end of sentence)'] = true,
254
+ ['ci: good punctuation at end of sentence]'] = true,
255
+
256
+ ['ci: Capitalized first word'] = false,
257
+ ['ci: UPPER_CASE First Word'] = true,
258
+ ['ci: very very very very very very very very very very very looong subject'] = false,
259
+
260
+ -- Body
261
+ ['ci: desc\n\nDetails:\n- Body'] = true,
262
+ ['ci: desc\n\nDetails:\n- Body\n\nwith\n \nempty and blank lines'] = true,
263
+
264
+ ['ci: desc\nSecond line is not empty'] = false,
265
+ ['ci: desc\n\n First body line starts with whitespace'] = false,
266
+
267
+ -- Line width should be checked only in not cleaned up lines
268
+ ['ci: desc\n\nDetails:\n- Body\nwith\nVery very very very very very very very very very very very very looong body line'] = false,
269
+ ['ci: desc\n\nDetails:\n- Body\nwith\n# Comment with very very very very very very very very very very looong body line'] = true,
270
+ ['ci: desc\n\nDetails:\n- Body\nwith\n# ------------------------ >8 ------------------------\nVery very very very very very very very very very very very very looong body line'] = true,
271
+
272
+ -- Trailing blank lines are allowed in not strict context
273
+ ['ci: only two lines\n\n'] = true,
274
+ ['ci: desc\n\nDetails:\n- Last line is empty\n\n'] = true,
275
+ ['ci: desc\n\nDetails:\n- Last line is blank\n '] = true,
276
+
277
+ -- Forge directives should follow specific template
278
+ ['ci: desc\n\nResolve #1'] = true,
279
+ ['ci: desc\n\nResolve nvim-mini/MiniMax#1'] = true,
280
+ ['ci: desc\n\nRelated to #1'] = true,
281
+ ['ci: desc\n\nRelated to nvim-mini/MiniMax#1'] = true,
282
+
283
+ -- Git footer
284
+ ['ci: desc\n\nCo-authored-by: Neo McVim <neo.mcvim@gmail.com>'] = true,
285
+
286
+ -- Special body lines should go in specific order
287
+ ['ci: desc\n\nDetails:\n- Body\n\nResolve #1'] = true,
288
+ ['ci: desc\n\nResolve #1\n\nDetails:\n- Body'] = false,
289
+ ['ci: desc\n\nDetails:\n- Body\n\nCo-authored-by: Neo McVim <neo.mcvim@gmail.com>'] = true,
290
+ ['ci: desc\n\nCo-authored-by: Neo McVim <neo.mcvim@gmail.com>\n\nDetails:\n- Body'] = false,
291
+ ['ci: desc\n\nResolve #1\n\nCo-authored-by: Neo McVim <neo.mcvim@gmail.com>'] = true,
292
+ ['ci: desc\n\nCo-authored-by: Neo McVim <neo.mcvim@gmail.com>\n\nResolve #1'] = false,
293
+
294
+ ['ci: desc\n\nDetails:\n- Body\n\nResolve #1\n\nCo-authored-by: Neo McVim <neo.mcvim@gmail.com>'] = true,
295
+ ['ci: desc\n\nResolve #1\n\nDetails:\n- Body\n\nCo-authored-by: Neo McVim <neo.mcvim@gmail.com>'] = false,
296
+ ['ci: desc\n\nResolve #1\n\nCo-authored-by: Neo McVim <neo.mcvim@gmail.com>\n\nDetails:\n- Body'] = false,
297
+ ['ci: desc\n\nCo-authored-by: Neo McVim <neo.mcvim@gmail.com>\n\nResolve #1\n\nDetails:\n- Body'] = false,
298
+ ['ci: desc\n\nDetails:\n- Body\n\nCo-authored-by: Neo McVim <neo.mcvim@gmail.com>\n\nResolve #1'] = false,
299
+ ['ci: desc\n\nCo-authored-by: Neo McVim <neo.mcvim@gmail.com>\n\nDetails:\n- Body\n\nResolve #1'] = false,
300
+
301
+ -- Bad wordings
302
+ ['ci: this has Fixed #1'] = false,
303
+ ['ci: this has fixed #1'] = false,
304
+ ['ci: this Fixes #1'] = false,
305
+ ['ci: this fixes #1'] = false,
306
+ ['ci: this will Fix #1'] = false,
307
+ ['ci: this will fix #1'] = false,
308
+ ['ci: this has Closed #1'] = false,
309
+ ['ci: this has closed #1'] = false,
310
+ ['ci: this Closes #1'] = false,
311
+ ['ci: this closes #1'] = false,
312
+ ['ci: this will Close #1'] = false,
313
+ ['ci: this will close #1'] = false,
314
+ ['ci: this has Resolved #1'] = false,
315
+ ['ci: this has resolved #1'] = false,
316
+ ['ci: this Resolves #1'] = false,
317
+ ['ci: this resolves #1'] = false,
318
+
319
+ ['ci: desc\n\nthis has Fixed #1'] = false,
320
+ ['ci: desc\n\nthis has fixed #1'] = false,
321
+ ['ci: desc\n\nthis Fixes #1'] = false,
322
+ ['ci: desc\n\nthis fixes #1'] = false,
323
+ ['ci: desc\n\nthis will Fix #1'] = false,
324
+ ['ci: desc\n\nthis will fix #1'] = false,
325
+ ['ci: desc\n\nthis has Closed #1'] = false,
326
+ ['ci: desc\n\nthis has closed #1'] = false,
327
+ ['ci: desc\n\nthis Closes #1'] = false,
328
+ ['ci: desc\n\nthis closes #1'] = false,
329
+ ['ci: desc\n\nthis will Close #1'] = false,
330
+ ['ci: desc\n\nthis will close #1'] = false,
331
+ ['ci: desc\n\nthis has Resolved #1'] = false,
332
+ ['ci: desc\n\nthis has resolved #1'] = false,
333
+ ['ci: desc\n\nthis Resolves #1'] = false,
334
+ ['ci: desc\n\nthis resolves #1'] = false,
335
+
336
+ -- Comments are allowed in not strict context
337
+ ['# Comment\nci: desc'] = true,
338
+ [' # Comment\nci: desc'] = true,
339
+ ['ci: desc\n# Comment\n\nDetails:\n- Body'] = true,
340
+
341
+ -- Allow all empty lines
342
+ [''] = true,
343
+ ['\n'] = true,
344
+ ['\n# Comment'] = true,
345
+ }
346
+
347
+ _G.test_cases_failed = {}
348
+
349
+ vim.loop.os_unsetenv('LINTCOMMIT_STRICT')
350
+ for message, expected in pairs(test_cases) do
351
+ local lines = vim.split(message, '\n')
352
+ local is_valid, reason = validate_commit_msg(lines)
353
+ if is_valid ~= expected then
354
+ table.insert(_G.test_cases_failed, { msg = message, expected = expected, actual = is_valid, reason = reason })
355
+ end
356
+ end
357
+
358
+ vim.loop.os_setenv('LINTCOMMIT_STRICT', 'true')
359
+ local strict_test_cases = {
360
+ -- Fixup commit type is not allowed
361
+ ['fixup'] = false,
362
+ ['fixup: should fail'] = false,
363
+ ['fixup! should fail'] = false,
364
+
365
+ -- - Should only matter in subject
366
+ ['ci: desc\n\nDetails:\n- fixup'] = true,
367
+
368
+ -- Do not allow comments outside of commit body
369
+ ['# Comment\nci: desc'] = false,
370
+ [' # Comment\nci: desc'] = false,
371
+ ['ci: desc\n# Comment\n\nBody'] = false,
372
+
373
+ ['ci: desc\n\nDetails:\n- Body\n# Comment in body'] = true,
374
+
375
+ -- Check line width even in previously ignored contexts
376
+ ['ci: desc\n\nBody\nwith\n# Comment with very very very very very very very very very very looong body line'] = false,
377
+ ['ci: desc\n\nBody\nwith\n# ------------------------ >8 ------------------------\nVery very very very very very very very very very very very very looong body line'] = false,
378
+
379
+ -- Trailing blank lines are not allowed in strict context
380
+ ['ci: only two lines\n\n'] = false,
381
+ ['ci: desc\n\nLast line is empty\n\n'] = false,
382
+ ['ci: desc\n\nLast line is blank\n '] = false,
383
+ }
384
+ for message, expected in pairs(strict_test_cases) do
385
+ local lines = vim.split(message, '\n')
386
+ local is_valid = validate_commit_msg(lines)
387
+ if is_valid ~= expected then
388
+ table.insert(_G.test_cases_failed, { msg = message, expected = expected, actual = is_valid })
389
+ end
390
+ end
391
+
392
+ -- Cleanup
393
+ vim.loop.os_unsetenv('LINTCOMMIT_STRICT')
@@ -0,0 +1,57 @@
1
+ local minidoc = require('mini.doc')
2
+
3
+ if _G.MiniDoc == nil then minidoc.setup() end
4
+
5
+ local modules = {
6
+ 'ai',
7
+ 'align',
8
+ 'animate',
9
+ 'base16',
10
+ 'basics',
11
+ 'bracketed',
12
+ 'bufremove',
13
+ 'clue',
14
+ 'cmdline',
15
+ 'colors',
16
+ 'comment',
17
+ 'completion',
18
+ 'cursorword',
19
+ 'deps',
20
+ 'diff',
21
+ 'doc',
22
+ 'extra',
23
+ 'files',
24
+ 'fuzzy',
25
+ 'git',
26
+ 'hipatterns',
27
+ 'hues',
28
+ 'icons',
29
+ 'indentscope',
30
+ 'input',
31
+ 'jump',
32
+ 'jump2d',
33
+ 'keymap',
34
+ 'map',
35
+ 'misc',
36
+ 'move',
37
+ 'notify',
38
+ 'operators',
39
+ 'pairs',
40
+ 'pick',
41
+ 'sessions',
42
+ 'snippets',
43
+ 'splitjoin',
44
+ 'starter',
45
+ 'statusline',
46
+ 'surround',
47
+ 'tabline',
48
+ 'test',
49
+ 'trailspace',
50
+ 'visits',
51
+ }
52
+
53
+ MiniDoc.generate({ 'lua/mini/init.lua' }, 'doc/mini-nvim.txt')
54
+
55
+ for _, m in ipairs(modules) do
56
+ MiniDoc.generate({ 'lua/mini/' .. m .. '.lua' }, 'doc/mini-' .. m .. '.txt')
57
+ end
@@ -0,0 +1,28 @@
1
+ -- Add project root as full path to runtime path (in order to be able to
2
+ -- `require()`) modules from this module
3
+ vim.cmd([[let &rtp.=','.getcwd()]])
4
+
5
+ -- Ensure persistent color scheme (matters after new default in Neovim 0.10)
6
+ vim.o.background = 'dark'
7
+ require('mini.hues').setup({ background = '#11262d', foreground = '#c0c8cc', autoadjust = false })
8
+ vim.g.colors_name = 'minitest-scheme'
9
+
10
+ -- - Make screenshot tests more robust across Neovim versions
11
+ vim.o.statusline = '%<%f %l,%c%V'
12
+
13
+ if vim.fn.has('nvim-0.11') == 1 then
14
+ vim.api.nvim_set_hl(0, 'PmenuMatch', { link = 'Pmenu' })
15
+ vim.api.nvim_set_hl(0, 'PmenuMatchSel', { link = 'PmenuSel' })
16
+ end
17
+
18
+ -- Ensure no custom fold method in Lua files (it interferes with many tests)
19
+ vim.cmd('au FileType lua set foldmethod=manual')
20
+
21
+ -- - Ensure that child process is tested with termguicolors, since 'mini.hues'
22
+ -- only works with it. This might matter with screenshot testing.
23
+ -- One example is how https://github.com/neovim/neovim/pull/35026 adjusts
24
+ -- the behavior based on the presence of `rgb`.
25
+ -- NOTE: similar effect can be achieved by adding the following to
26
+ -- `child.setup` in 'helpers.lua':
27
+ -- `child.api.nvim_ui_attach(child.o.columns, child.o.lines, { rgb=true })`
28
+ vim.o.termguicolors = true