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,508 @@
1
+ *mini.icons* Icon provider
2
+
3
+ MIT License Copyright (c) 2024 Evgeni Chasnovski
4
+
5
+ ------------------------------------------------------------------------------
6
+ *MiniIcons*
7
+ Features:
8
+
9
+ - Provide icons with their highlighting via a single |MiniIcons.get()| for
10
+ various categories: filetype, file/directory path, extension, operating
11
+ system, LSP kind values. Icons and category defaults can be overridden.
12
+
13
+ - Configurable styles: "glyph" (icon glyphs) or "ascii" (non-glyph fallback).
14
+
15
+ - Fixed set of highlight groups (linked to built-in groups by default) for
16
+ better blend with color scheme.
17
+
18
+ - Caching for maximum performance.
19
+
20
+ - Integration with |vim.filetype.add()| and |vim.filetype.match()|.
21
+
22
+ - Mocking methods of `nvim-tree/nvim-web-devicons` for better integrations
23
+ with plugins outside |mini.nvim|. See |MiniIcons.mock_nvim_web_devicons()|.
24
+
25
+ - Tweaking built-in maps for "LSP kind" to include icons. In particular, this
26
+ makes |mini.completion| use icons in LSP step. See |MiniIcons.tweak_lsp_kind()|.
27
+
28
+ Notes:
29
+
30
+ - It is not a goal to become a collection of icons for as much use cases as
31
+ possible. There are specific criteria for icon data to be included as
32
+ built-in in each category (see |MiniIcons.get()|).
33
+ The main supported category is "filetype".
34
+
35
+ Sources with more details:
36
+ - |MiniIcons-in-other-plugins| (for plugin authors)
37
+
38
+ # Dependencies ~
39
+
40
+ Suggested dependencies:
41
+
42
+ - Terminal emulator that supports showing special utf8 glyphs, possibly with
43
+ "overflow" view (displaying is done not in one but two visual cells).
44
+ Most modern feature-rich terminal emulators support this out of the box:
45
+ WezTerm, Kitty, Alacritty, iTerm2, Ghostty.
46
+ Not having "overflow" feature only results into smaller icons.
47
+ Not having support for special utf8 glyphs will result into seemingly
48
+ random symbols (or question mark squares) instead of icon glyphs.
49
+
50
+ - Font that supports Nerd Fonts (https://www.nerdfonts.com) icons from
51
+ version 3.0.0+ (in particular `nf-md-*` class).
52
+ This should be configured on terminal emulator level either by using font
53
+ patched with Nerd Fonts icons or using `NerdFontsSymbolsOnly` font as
54
+ a fallback for glyphs that are not supported in main font.
55
+
56
+ If using terminal emulator and/or font with icon support is impossible, use
57
+ `config.style = 'ascii'`. It will use a (less visually appealing) set of
58
+ non-glyph icons.
59
+
60
+ # Setup ~
61
+
62
+ This module needs a setup with `require('mini.icons').setup({})` (replace `{}`
63
+ with your `config` table). It will create global Lua table `MiniIcons` which you
64
+ can use for scripting or manually (with `:lua MiniIcons.*`).
65
+
66
+ See |MiniIcons.config| for `config` structure and default values.
67
+
68
+ # Comparisons ~
69
+
70
+ - [nvim-tree/nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons) (for users):
71
+ - Sets individual colors to each icon with separate specific highlight
72
+ groups, while this modules uses fixed set of highlight groups.
73
+ This makes it easier to customize in bulk and actually blend with any
74
+ color scheme.
75
+
76
+ - This module prefers richer set of `nf-md-*` (from "Material design" set)
77
+ Nerd Fonts icons while `nvim-web-devicons` mostly prefers `nf-dev-*`
78
+ (from "devicons" set).
79
+
80
+ - Supported categories are slightly different (with much overlap).
81
+
82
+ - Both support customization of any icon. Only this module supports
83
+ customization of default ones per supported category.
84
+
85
+ - Using this module can occasionally result in small delays when used
86
+ synchronously for many times to get icons for not typical files (like
87
+ in |mini.files|). This is due to using |vim.filetype.match()| fallback and
88
+ is present only during first call, as value is cached for later uses.
89
+
90
+ - This module supports different icon styles (like "ascii" for when using
91
+ glyphs is not possible), while `nvim-web-devicons` does not.
92
+
93
+ - This module provides |MiniIcons.mock_nvim_web_devicons()| function which
94
+ when called imitates installed `nvim-web-devicons` plugin to support
95
+ other plugins which do not provide |mini.icons| yet.
96
+
97
+ - [nvim-tree/nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons) (for plugin developers):
98
+ - Both have main "get icon" type of function:
99
+ - Both return tuple of icon and highlight group strings.
100
+
101
+ - This module always returns icon data possibly falling back to
102
+ user's configured default, while `nvim-web-devicons` is able to
103
+ return `nil`. This module's approach is more aligned with the most
104
+ common use case of always showing an icon instead or near some data.
105
+ There is a third returned value indicating if output is a result of
106
+ a fallback (see |MiniIcons.get()|).
107
+
108
+ - This module uses |vim.filetype.match()| as a fallback for "file"
109
+ and "extension" categories, while `nvim-web-devicons` completely
110
+ relies on the manually maintained tables of supported filenames
111
+ and extensions.
112
+ Using fallback results in a wider support and deeper integration
113
+ with Neovim's filetype detection at the cost of occasional slower
114
+ first call. The difference is reduced as much as is reasonable by
115
+ preferring faster file extension resolution over filetype matching.
116
+
117
+ - This module caches all its return values resulting in really fast
118
+ next same argument calls, while `nvim-web-devicons` doesn't do that.
119
+
120
+ - This module works with full file/directory paths as input.
121
+
122
+ - Different sets of supported categories (see |MiniIcons.config|):
123
+ - Both support "file", "extension", "filetype", "operating system".
124
+ Albeit in different volumes: `nvim-web-devicons` covers more
125
+ cases for "operating system", while this module has better eventual
126
+ coverage for other cases.
127
+
128
+ - This module supports "directory" and "lsp" categories.
129
+
130
+ - `nvim-web-devicons` covers "desktop environment" and "window
131
+ management" categories. This modules does not include them due to
132
+ relatively low demand.
133
+
134
+ - [onsails/lspkind.nvim](https://github.com/onsails/lspkind.nvim):
135
+ - Provides icons only for `CompletionItemKind`, while this module also has
136
+ icons for `SymbolKind` and other non-LSP categories.
137
+ - Provides dedicated formatting function for `hrsh7th/nvim-cmp` while this
138
+ module intentionally does not (adding icons should be straightforward
139
+ to manually implement while anything else is out of scope).
140
+
141
+ # Highlight groups ~
142
+ *MiniIcons-hl-groups*
143
+
144
+ Only the following set of highlight groups is used as icon highlight.
145
+ It is recommended that they all only define colored foreground:
146
+
147
+ - `MiniIconsAzure` - azure.
148
+ - `MiniIconsBlue` - blue.
149
+ - `MiniIconsCyan` - cyan.
150
+ - `MiniIconsGreen` - green.
151
+ - `MiniIconsGrey` - grey.
152
+ - `MiniIconsOrange` - orange.
153
+ - `MiniIconsPurple` - purple.
154
+ - `MiniIconsRed` - red.
155
+ - `MiniIconsYellow` - yellow.
156
+
157
+ To change any highlight group, set it directly with |nvim_set_hl()|.
158
+
159
+ # Using in other plugins ~
160
+ *MiniIcons-in-other-plugins*
161
+
162
+ - Perform a `_G.MiniIcons ~= nil` check before using any feature. This ensures
163
+ that user explicitly set up the module.
164
+
165
+ - Use |MiniIcons.get()| function to get icon string and more data about it.
166
+
167
+ - For file icons prefer using full path instead of relative or only basename.
168
+ It makes a difference if path matches pattern that uses parent directories.
169
+ The |MiniIcons.config| has an example of that.
170
+
171
+ ------------------------------------------------------------------------------
172
+ *MiniIcons.setup()*
173
+ `MiniIcons.setup`({config})
174
+ Module setup
175
+
176
+ Parameters ~
177
+ {config} `(table|nil)` Module config table. See |MiniIcons.config|.
178
+
179
+ Usage ~
180
+ >lua
181
+ require('mini.icons').setup() -- use default config
182
+ -- OR
183
+ require('mini.icons').setup({}) -- replace {} with your config table
184
+ <
185
+ ------------------------------------------------------------------------------
186
+ *MiniIcons.config*
187
+ `MiniIcons.config`
188
+ Defaults ~
189
+ >lua
190
+ MiniIcons.config = {
191
+ -- Icon style: 'glyph' or 'ascii'
192
+ style = 'glyph',
193
+
194
+ -- Customize per category. See `:h MiniIcons.config` for details.
195
+ default = {},
196
+ directory = {},
197
+ extension = {},
198
+ file = {},
199
+ filetype = {},
200
+ lsp = {},
201
+ os = {},
202
+
203
+ -- Control which extensions will be considered during "file" resolution
204
+ use_file_extension = function(ext, file) return true end,
205
+ }
206
+ <
207
+ # Style ~
208
+
209
+ `config.style` is a string defining which icon style to use. It can be:
210
+ - `'glyph'` (default) - use glyph icons (like 󰈔 and 󰉋 ).
211
+ - `'ascii'` - use fallback ASCII-compatible icons. Those are computed as
212
+ an upper first character of the icon's resolved name inside its category.
213
+ Examples: >lua
214
+
215
+ MiniIcons.get('file', 'Makefile') -- Has `'M'` as icon
216
+ MiniIcons.get('extension', 'lua') -- Has `'L'` as icon
217
+ MiniIcons.get('file', 'file.lua') -- Has `'L'` as icon; it is resolved to
218
+ -- come from 'lua' 'extension' category
219
+ MiniIcons.get('file', 'myfile') -- Has `'F'` as icon; it is resolved to
220
+ -- come from 'file' 'default' category
221
+ <
222
+ # Customization per category ~
223
+
224
+ The following entries can be used to customize icons for supported categories:
225
+ - `config.default`
226
+ - `config.directory`
227
+ - `config.extension`
228
+ - `config.file`
229
+ - `config.filetype`
230
+ - `config.lsp`
231
+ - `config.os`
232
+
233
+ Customization should be done by supplying a table with <glyph> (icon glyph)
234
+ and/or <hl> (name of highlight group) string fields as a value for an icon
235
+ name entry. Example: >lua
236
+
237
+ require('mini.icons').setup({
238
+ default = {
239
+ -- Override default glyph for "file" category (reuse highlight group)
240
+ file = { glyph = '󰈤' },
241
+ },
242
+ extension = {
243
+ -- Override highlight group (not necessarily from 'mini.icons')
244
+ lua = { hl = 'Special' },
245
+
246
+ -- Add icons for custom extension. This will also be used in
247
+ -- 'file' category for input like 'file.my.ext'.
248
+ ['my.ext'] = { glyph = '󰻲', hl = 'MiniIconsRed' },
249
+ },
250
+ })
251
+ <
252
+ Notes:
253
+ - These customizations only take effect inside |MiniIcons.setup()| call.
254
+ Changing interactively via `:lua MiniIcons.config.xxx = { ... }` does not work
255
+ for performance reasons.
256
+ - Use lower case names for categories which are matched ignoring case.
257
+ See |MiniIcons.get()| for more details.
258
+
259
+ # Using extension during file resolution ~
260
+
261
+ `config.use_file_extension` is a function which can be used to control which
262
+ extensions will be considered as a source of icon data during "file" category
263
+ resolution (see |MiniIcons.get()| for more details).
264
+ Default: function which always returns `true` (i.e. consider all extensions).
265
+
266
+ Will be called once for the biggest suffix after dot found in the file name.
267
+ The arguments will be `ext` (found extension; lowercase) and `file` (input for
268
+ which icon is computed; as is). Should explicitly return `true` if `ext` is to
269
+ be considered (i.e. call `MiniIcons.get('extension', ext)` and use its
270
+ output if it is not default). Otherwise extension won't be even considered.
271
+
272
+ The primary use case for this setting is to ensure that some extensions are
273
+ ignored in order for resolution to reach |vim.filetype.match()| stage. This
274
+ is needed if filetype detection has been setup for files with recognizable
275
+ extension and conflicting icons (which you want to use). Note: if problematic
276
+ filetype detection only involves file names that are known in advance, prefer
277
+ using `config.file` customization.
278
+
279
+ Example: >lua
280
+
281
+ -- Built-in filetype detection recognizes files like "queries/.*%.scm"
282
+ -- as "query" filetype. However, without special setup, 'mini.icons' will
283
+ -- use "scm" extension to resolve as Scheme file. Here is a setup to ignore
284
+ -- "scm" extension and completely rely on `vim.filetype.match()` fallback.
285
+ require('mini.icons').setup({
286
+ -- Check last letters explicitly to account for dots in file name
287
+ use_file_extension = function(ext) return ext:sub(-3) ~= 'scm' end
288
+ })
289
+
290
+ -- Other common choices for extensions to ignore: "yml", "json", "txt".
291
+ <
292
+ ------------------------------------------------------------------------------
293
+ *MiniIcons.get()*
294
+ `MiniIcons.get`({category}, {name})
295
+ Get icon data
296
+
297
+ Usage example: >lua
298
+
299
+ -- Results into `icon='󰢱'`, `hl='MiniIconsAzure'`, `is_default=false`
300
+ local icon, hl, is_default = MiniIcons.get('file', 'file.lua')
301
+ <
302
+ Notes:
303
+ - Always returns some data, even if icon name is not explicitly supported
304
+ within target category. Category "default" is used as a fallback. Use third
305
+ output value to check if this particular case is a result of a fallback.
306
+
307
+ - Glyphs are explicitly preferred (when reasonable) from a richer set of
308
+ `nf-md-*` class ("Material design" set) of Nerd Fonts icons.
309
+
310
+ - Output is cached after the first call to increase performance of next calls
311
+ with same arguments. To reset cache, call |MiniIcons.setup()|.
312
+
313
+ - To increase first call performance for "extension" and "file" categories,
314
+ add frequently used values in |MiniIcons.config|. They will be preferred
315
+ over executing |vim.filetype.match()|.
316
+
317
+ - Matching icon name for "file" and "directory" categories is done exactly
318
+ and respecting case. Others are done ignoring case.
319
+
320
+ Parameters ~
321
+ {category} `(string)` Category name. Supported categories:
322
+ - `'default'` - icon data used as fallback for any category.
323
+ Icon names:
324
+ - <Input>: any supported category name.
325
+ - <Built-in>: only supported category names.
326
+
327
+ Examples: >lua
328
+
329
+ MiniIcons.get('default', 'file')
330
+ <
331
+ - `'directory'` - icon data for directory path.
332
+ Icon names:
333
+ - <Input>: any string, but only basename is used. Works with not present
334
+ paths (no check is done).
335
+ - <Built-in>: popular directory names not tied to language/software
336
+ (with few notable exceptions like Neovim, Git, etc.).
337
+
338
+ Examples: >lua
339
+
340
+ -- All of these will result in the same output
341
+ MiniIcons.get('directory', '.config')
342
+ MiniIcons.get('directory', '~/.config')
343
+ MiniIcons.get('directory', '/home/user/.config')
344
+
345
+ -- Results in different output
346
+ MiniIcons.get('directory', '.Config')
347
+ <
348
+ - `'extension'` - icon data for extension.
349
+ Icon names:
350
+ - <Input>: any string (without extra dot prefix).
351
+ - <Built-in>: popular extensions without associated filetype plus a set
352
+ for which filetype detection gives not good enough result.
353
+
354
+ Icon data is attempted to be resolved in the following order:
355
+ - List of user configured and built-in extensions (for better results).
356
+ Run `:=MiniIcons.list('extension')` to see them.
357
+ Used also if present as suffix after the dot (widest one preferred).
358
+ - Filetype as a result of |vim.filetype.match()| with placeholder
359
+ file name. Uses icon data from "filetype" category.
360
+
361
+ Examples: >lua
362
+
363
+ -- All of these will result in the same output
364
+ MiniIcons.get('extension', 'lua')
365
+ MiniIcons.get('extension', 'LUA')
366
+ MiniIcons.get('extension', 'my.lua')
367
+ <
368
+ - `'file'` - icon data for file path.
369
+ Icon names:
370
+ - <Input>: any string. Works with not present paths (no check is done).
371
+ - <Built-in>: popular file names not tied to language/software
372
+ (with few notable exceptions like Neovim, Git, etc.) plus a set which
373
+ has recognizable extension but has special detectable filetype.
374
+
375
+ Icon data is attempted to be resolved in the following order:
376
+ - List of user configured and built-in file names (matched to basename
377
+ of the input exactly). Run `:=MiniIcons.list('file')` to see them.
378
+ - Basename extension:
379
+ - Matched directly as `get('extension', ext)`, where `ext` is the
380
+ widest suffix after the dot.
381
+ - Considered only if `config.use_file_extension` returned `true`.
382
+ - Only recognizable extensions (i.e. not default fallback) are used.
383
+ - Filetype as a result of |vim.filetype.match()| with full input (not
384
+ basename) as `filename`. Uses icon data from "filetype" category.
385
+
386
+ Examples: >lua
387
+
388
+ -- All of these will result in the same output
389
+ MiniIcons.get('file', 'init.lua')
390
+ MiniIcons.get('file', '~/.config/nvim/init.lua')
391
+ MiniIcons.get('file', '/home/user/.config/nvim/init.lua')
392
+
393
+ -- Results in different output
394
+ MiniIcons.get('file', 'Init.lua')
395
+ MiniIcons.get('file', 'init.LUA')
396
+
397
+ -- Respects full path input in `vim.filetype.match()`
398
+ MiniIcons.get('file', '.git/info/attributes')
399
+ <
400
+ - `'filetype'` - icon data for |'filetype'| values.
401
+ Icon names:
402
+ - <Input>: any string.
403
+ - <Built-in>: any filetype that is reasonably used in Neovim ecosystem.
404
+ This category is intended as a widest net for supporting use cases.
405
+ Users are encouraged to have a specific filetype detection set up.
406
+
407
+ Examples: >lua
408
+
409
+ MiniIcons.get('filetype', 'lua')
410
+ MiniIcons.get('filetype', 'help')
411
+ MiniIcons.get('filetype', 'minifiles')
412
+ <
413
+ - `'lsp'` - icon data for various "LSP kind" values.
414
+ Icon names:
415
+ - <Input>: any string.
416
+ - <Built-in>: only namespace entries from LSP specification that can
417
+ be displayed to the user. Like `CompletionItemKind`, `SymbolKind`, etc.
418
+
419
+ Examples: >lua
420
+
421
+ MiniIcons.get('lsp', 'array')
422
+ MiniIcons.get('lsp', 'keyword')
423
+ <
424
+ - `'os'` - icon data for popular operating systems.
425
+ Icon names:
426
+ - <Input>: any string.
427
+ - <Built-in>: only operating systems which have `nf-md-*` class icon.
428
+
429
+ Examples: >lua
430
+
431
+ MiniIcons.get('os', 'linux')
432
+ MiniIcons.get('os', 'arch')
433
+ MiniIcons.get('os', 'macos')
434
+ <
435
+ {name} `(string)` Icon name within category. Use |MiniIcons.list()| to get icon
436
+ names which are explicitly supported for specific category.
437
+
438
+ Return ~
439
+ `(...)` Tuple of icon string, highlight group name it is suggested to be
440
+ highlighted with, and boolean indicating whether this icon was returned
441
+ as a result of fallback to default. Example: >lua
442
+
443
+ -- Results into `icon='󰢱'`, `hl='MiniIconsAzure'`, `is_default=false`
444
+ local icon, hl, is_default = MiniIcons.get('file', 'file.lua')
445
+
446
+ -- Results into `icon='󰈔'`, `hl='MiniIconsGrey'`, `is_default=true`
447
+ local icon, hl, is_default = MiniIcons.get('file', 'not-supported')
448
+ <
449
+ ------------------------------------------------------------------------------
450
+ *MiniIcons.list()*
451
+ `MiniIcons.list`({category})
452
+ List explicitly supported icon names
453
+
454
+ Parameters ~
455
+ {category} `(string)` Category name supported by |MiniIcons.get()|.
456
+
457
+ Return ~
458
+ `(table)` Array of icon names which are explicitly supported for category.
459
+ Note, that `'file'` and `'extension'` categories support much more icon names
460
+ via their fallback to using |vim.filetype.match()| with `'filetype'` category.
461
+
462
+ ------------------------------------------------------------------------------
463
+ *MiniIcons.mock_nvim_web_devicons()*
464
+ `MiniIcons.mock_nvim_web_devicons`()
465
+ Mock `nvim-web-devicons` module
466
+
467
+ Call this function to mock exported functions of `nvim-tree/nvim-web-devicons`
468
+ plugin. It will mock all its functions which return icon data by
469
+ using |MiniIcons.get()| equivalent.
470
+
471
+ This function is useful if any plugins relevant to you depend solely on
472
+ `nvim-web-devicons` and have not yet added an integration with |mini.icons|.
473
+
474
+ Full example of usage: >lua
475
+
476
+ require('mini.icons').setup()
477
+ MiniIcons.mock_nvim_web_devicons()
478
+ <
479
+ Works without installed `nvim-web-devicons` and even with it installed (needs
480
+ to be called after `nvim-web-devicons` is set up).
481
+
482
+ ------------------------------------------------------------------------------
483
+ *MiniIcons.tweak_lsp_kind()*
484
+ `MiniIcons.tweak_lsp_kind`({mode})
485
+ Tweak built-in LSP kind names
486
+
487
+ Update in place appropriate maps in |vim.lsp.protocol| (`CompletionItemKind`
488
+ and `SymbolKind`) by using icon strings from "lsp" category. Only "numeric
489
+ id to kind name" part is updated (to preserve data from original map).
490
+
491
+ Updating is done in one of these modes:
492
+ - Append: add icon after text.
493
+ - Prepend: add icon before text (default).
494
+ - Replace: use icon instead of text.
495
+
496
+ Notes:
497
+ - Makes |mini.completion| show icons, as it uses built-in protocol map.
498
+ - Results in loading whole `vim.lsp` module, so might add significant amount
499
+ of time on startup. Call it lazily. For example, with |MiniDeps.later()|: >lua
500
+
501
+ require('mini.icons').setup()
502
+ MiniDeps.later(MiniIcons.tweak_lsp_kind)
503
+ <
504
+ Parameters ~
505
+ {mode} `(string|nil)` One of "prepend" (default), "append", "replace".
506
+
507
+
508
+ vim:tw=78:ts=8:noet:ft=help:norl: