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.
- package/.conda/retrovim.yaml +259 -0
- package/.conda/terax.icns +0 -0
- package/.conda/terax.ico +0 -0
- package/.conda/terax.png +0 -0
- package/.github/workflows/release.yml +95 -0
- package/.gitmodules +3 -0
- package/.npm/kanata_touchcursor.js +28 -0
- package/.npm/nvim.js +26 -0
- package/.npm/yazi.js +26 -0
- package/.npm/zsh.js +17 -0
- package/.pip/kanata_touchcursor/__init__.py +28 -0
- package/.pip/nvim/__init__.py +31 -0
- package/.pip/yazi/__init__.py +31 -0
- package/.pip/zsh/__init__.py +22 -0
- package/CHANGELOG.md +26 -0
- package/LICENSE +674 -0
- package/README.md +336 -0
- package/kanata/touchcursor.kbd +164 -0
- package/nvim/init.lua +813 -0
- package/nvim/plugins/mini.nvim/.github/DISCUSSION_TEMPLATE/q-a.yml +72 -0
- package/nvim/plugins/mini.nvim/.github/ISSUE_TEMPLATE/bug-report.yml +136 -0
- package/nvim/plugins/mini.nvim/.github/ISSUE_TEMPLATE/config.yml +5 -0
- package/nvim/plugins/mini.nvim/.github/ISSUE_TEMPLATE/feature-request.yml +75 -0
- package/nvim/plugins/mini.nvim/.github/PULL_REQUEST_TEMPLATE.md +2 -0
- package/nvim/plugins/mini.nvim/.github/workflows/quality-control.yml +150 -0
- package/nvim/plugins/mini.nvim/.pre-commit-config.yaml +20 -0
- package/nvim/plugins/mini.nvim/.stylua.toml +7 -0
- package/nvim/plugins/mini.nvim/.styluaignore +1 -0
- package/nvim/plugins/mini.nvim/CHANGELOG.md +1894 -0
- package/nvim/plugins/mini.nvim/CODE_OF_CONDUCT.md +132 -0
- package/nvim/plugins/mini.nvim/CONTRIBUTING.md +331 -0
- package/nvim/plugins/mini.nvim/LICENSE +21 -0
- package/nvim/plugins/mini.nvim/MAINTAINING.md +330 -0
- package/nvim/plugins/mini.nvim/Makefile +51 -0
- package/nvim/plugins/mini.nvim/README.md +261 -0
- package/nvim/plugins/mini.nvim/TESTING.md +1011 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/README.md +35 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/benchmark.sh +56 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_dashboard-alpha.lua +21 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_dashboard-original.lua +17 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_dashboard-starter.lua +18 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_empty.lua +4 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_starter-default.lua +7 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_startify-alpha.lua +10 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_startify-original.lua +7 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/init-files/init_startify-starter.lua +20 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/install.sh +10 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/make_summary.py +68 -0
- package/nvim/plugins/mini.nvim/benchmarks/starter/startup-summary.md +10 -0
- package/nvim/plugins/mini.nvim/colors/miniautumn.lua +55 -0
- package/nvim/plugins/mini.nvim/colors/minicyan.lua +95 -0
- package/nvim/plugins/mini.nvim/colors/minischeme.lua +95 -0
- package/nvim/plugins/mini.nvim/colors/minispring.lua +53 -0
- package/nvim/plugins/mini.nvim/colors/minisummer.lua +49 -0
- package/nvim/plugins/mini.nvim/colors/miniwinter.lua +51 -0
- package/nvim/plugins/mini.nvim/colors/randomhue.lua +16 -0
- package/nvim/plugins/mini.nvim/doc/mini-ai.txt +889 -0
- package/nvim/plugins/mini.nvim/doc/mini-align.txt +923 -0
- package/nvim/plugins/mini.nvim/doc/mini-animate.txt +937 -0
- package/nvim/plugins/mini.nvim/doc/mini-base16.txt +285 -0
- package/nvim/plugins/mini.nvim/doc/mini-basics.txt +359 -0
- package/nvim/plugins/mini.nvim/doc/mini-bracketed.txt +622 -0
- package/nvim/plugins/mini.nvim/doc/mini-bufremove.txt +123 -0
- package/nvim/plugins/mini.nvim/doc/mini-clue.txt +760 -0
- package/nvim/plugins/mini.nvim/doc/mini-cmdline.txt +392 -0
- package/nvim/plugins/mini.nvim/doc/mini-colors.txt +880 -0
- package/nvim/plugins/mini.nvim/doc/mini-comment.txt +230 -0
- package/nvim/plugins/mini.nvim/doc/mini-completion.txt +477 -0
- package/nvim/plugins/mini.nvim/doc/mini-cursorword.txt +105 -0
- package/nvim/plugins/mini.nvim/doc/mini-deps.txt +590 -0
- package/nvim/plugins/mini.nvim/doc/mini-diff.txt +661 -0
- package/nvim/plugins/mini.nvim/doc/mini-doc.txt +434 -0
- package/nvim/plugins/mini.nvim/doc/mini-extra.txt +856 -0
- package/nvim/plugins/mini.nvim/doc/mini-files.txt +1018 -0
- package/nvim/plugins/mini.nvim/doc/mini-fuzzy.txt +160 -0
- package/nvim/plugins/mini.nvim/doc/mini-git.txt +425 -0
- package/nvim/plugins/mini.nvim/doc/mini-hipatterns.txt +489 -0
- package/nvim/plugins/mini.nvim/doc/mini-hues.txt +420 -0
- package/nvim/plugins/mini.nvim/doc/mini-icons.txt +508 -0
- package/nvim/plugins/mini.nvim/doc/mini-indentscope.txt +485 -0
- package/nvim/plugins/mini.nvim/doc/mini-input.txt +932 -0
- package/nvim/plugins/mini.nvim/doc/mini-jump.txt +202 -0
- package/nvim/plugins/mini.nvim/doc/mini-jump2d.txt +525 -0
- package/nvim/plugins/mini.nvim/doc/mini-keymap.txt +449 -0
- package/nvim/plugins/mini.nvim/doc/mini-map.txt +717 -0
- package/nvim/plugins/mini.nvim/doc/mini-misc.txt +431 -0
- package/nvim/plugins/mini.nvim/doc/mini-move.txt +181 -0
- package/nvim/plugins/mini.nvim/doc/mini-notify.txt +434 -0
- package/nvim/plugins/mini.nvim/doc/mini-nvim.txt +431 -0
- package/nvim/plugins/mini.nvim/doc/mini-operators.txt +472 -0
- package/nvim/plugins/mini.nvim/doc/mini-pairs.txt +346 -0
- package/nvim/plugins/mini.nvim/doc/mini-pick.txt +1535 -0
- package/nvim/plugins/mini.nvim/doc/mini-sessions.txt +239 -0
- package/nvim/plugins/mini.nvim/doc/mini-snippets.txt +1291 -0
- package/nvim/plugins/mini.nvim/doc/mini-splitjoin.txt +536 -0
- package/nvim/plugins/mini.nvim/doc/mini-starter.txt +618 -0
- package/nvim/plugins/mini.nvim/doc/mini-statusline.txt +361 -0
- package/nvim/plugins/mini.nvim/doc/mini-surround.txt +863 -0
- package/nvim/plugins/mini.nvim/doc/mini-tabline.txt +151 -0
- package/nvim/plugins/mini.nvim/doc/mini-test.txt +966 -0
- package/nvim/plugins/mini.nvim/doc/mini-trailspace.txt +91 -0
- package/nvim/plugins/mini.nvim/doc/mini-visits.txt +937 -0
- package/nvim/plugins/mini.nvim/logo.png +0 -0
- package/nvim/plugins/mini.nvim/lua/mini/ai.lua +2244 -0
- package/nvim/plugins/mini.nvim/lua/mini/align.lua +2076 -0
- package/nvim/plugins/mini.nvim/lua/mini/animate.lua +2127 -0
- package/nvim/plugins/mini.nvim/lua/mini/base16.lua +1752 -0
- package/nvim/plugins/mini.nvim/lua/mini/basics.lua +772 -0
- package/nvim/plugins/mini.nvim/lua/mini/bracketed.lua +2013 -0
- package/nvim/plugins/mini.nvim/lua/mini/bufremove.lua +283 -0
- package/nvim/plugins/mini.nvim/lua/mini/clue.lua +2096 -0
- package/nvim/plugins/mini.nvim/lua/mini/cmdline.lua +1182 -0
- package/nvim/plugins/mini.nvim/lua/mini/colors.lua +2483 -0
- package/nvim/plugins/mini.nvim/lua/mini/comment.lua +586 -0
- package/nvim/plugins/mini.nvim/lua/mini/completion.lua +2094 -0
- package/nvim/plugins/mini.nvim/lua/mini/cursorword.lua +311 -0
- package/nvim/plugins/mini.nvim/lua/mini/deps.lua +1660 -0
- package/nvim/plugins/mini.nvim/lua/mini/diff.lua +1938 -0
- package/nvim/plugins/mini.nvim/lua/mini/doc.lua +1371 -0
- package/nvim/plugins/mini.nvim/lua/mini/extra.lua +2290 -0
- package/nvim/plugins/mini.nvim/lua/mini/files.lua +3145 -0
- package/nvim/plugins/mini.nvim/lua/mini/fuzzy.lua +356 -0
- package/nvim/plugins/mini.nvim/lua/mini/git.lua +1737 -0
- package/nvim/plugins/mini.nvim/lua/mini/hipatterns.lua +1042 -0
- package/nvim/plugins/mini.nvim/lua/mini/hues.lua +2088 -0
- package/nvim/plugins/mini.nvim/lua/mini/icons.lua +2254 -0
- package/nvim/plugins/mini.nvim/lua/mini/indentscope.lua +1158 -0
- package/nvim/plugins/mini.nvim/lua/mini/init.lua +427 -0
- package/nvim/plugins/mini.nvim/lua/mini/input.lua +2183 -0
- package/nvim/plugins/mini.nvim/lua/mini/jump.lua +609 -0
- package/nvim/plugins/mini.nvim/lua/mini/jump2d.lua +1244 -0
- package/nvim/plugins/mini.nvim/lua/mini/keymap.lua +880 -0
- package/nvim/plugins/mini.nvim/lua/mini/map.lua +1709 -0
- package/nvim/plugins/mini.nvim/lua/mini/misc.lua +969 -0
- package/nvim/plugins/mini.nvim/lua/mini/move.lua +509 -0
- package/nvim/plugins/mini.nvim/lua/mini/notify.lua +938 -0
- package/nvim/plugins/mini.nvim/lua/mini/operators.lua +1349 -0
- package/nvim/plugins/mini.nvim/lua/mini/pairs.lua +657 -0
- package/nvim/plugins/mini.nvim/lua/mini/pick.lua +3876 -0
- package/nvim/plugins/mini.nvim/lua/mini/sessions.lua +689 -0
- package/nvim/plugins/mini.nvim/lua/mini/snippets.lua +2828 -0
- package/nvim/plugins/mini.nvim/lua/mini/splitjoin.lua +1132 -0
- package/nvim/plugins/mini.nvim/lua/mini/starter.lua +1599 -0
- package/nvim/plugins/mini.nvim/lua/mini/statusline.lua +686 -0
- package/nvim/plugins/mini.nvim/lua/mini/surround.lua +2388 -0
- package/nvim/plugins/mini.nvim/lua/mini/tabline.lua +564 -0
- package/nvim/plugins/mini.nvim/lua/mini/test.lua +2516 -0
- package/nvim/plugins/mini.nvim/lua/mini/trailspace.lua +215 -0
- package/nvim/plugins/mini.nvim/lua/mini/visits.lua +1577 -0
- package/nvim/plugins/mini.nvim/readmes/mini-ai.md +190 -0
- package/nvim/plugins/mini.nvim/readmes/mini-align.md +203 -0
- package/nvim/plugins/mini.nvim/readmes/mini-animate.md +214 -0
- package/nvim/plugins/mini.nvim/readmes/mini-base16.md +198 -0
- package/nvim/plugins/mini.nvim/readmes/mini-basics.md +184 -0
- package/nvim/plugins/mini.nvim/readmes/mini-bracketed.md +193 -0
- package/nvim/plugins/mini.nvim/readmes/mini-bufremove.md +139 -0
- package/nvim/plugins/mini.nvim/readmes/mini-clue.md +260 -0
- package/nvim/plugins/mini.nvim/readmes/mini-cmdline.md +183 -0
- package/nvim/plugins/mini.nvim/readmes/mini-colors.md +169 -0
- package/nvim/plugins/mini.nvim/readmes/mini-comment.md +183 -0
- package/nvim/plugins/mini.nvim/readmes/mini-completion.md +217 -0
- package/nvim/plugins/mini.nvim/readmes/mini-cursorword.md +137 -0
- package/nvim/plugins/mini.nvim/readmes/mini-deps.md +271 -0
- package/nvim/plugins/mini.nvim/readmes/mini-diff.md +289 -0
- package/nvim/plugins/mini.nvim/readmes/mini-doc.md +198 -0
- package/nvim/plugins/mini.nvim/readmes/mini-extra.md +158 -0
- package/nvim/plugins/mini.nvim/readmes/mini-files.md +247 -0
- package/nvim/plugins/mini.nvim/readmes/mini-fuzzy.md +134 -0
- package/nvim/plugins/mini.nvim/readmes/mini-git.md +168 -0
- package/nvim/plugins/mini.nvim/readmes/mini-hipatterns.md +176 -0
- package/nvim/plugins/mini.nvim/readmes/mini-hues.md +285 -0
- package/nvim/plugins/mini.nvim/readmes/mini-icons.md +183 -0
- package/nvim/plugins/mini.nvim/readmes/mini-indentscope.md +191 -0
- package/nvim/plugins/mini.nvim/readmes/mini-input.md +163 -0
- package/nvim/plugins/mini.nvim/readmes/mini-jump.md +161 -0
- package/nvim/plugins/mini.nvim/readmes/mini-jump2d.md +197 -0
- package/nvim/plugins/mini.nvim/readmes/mini-keymap.md +205 -0
- package/nvim/plugins/mini.nvim/readmes/mini-map.md +191 -0
- package/nvim/plugins/mini.nvim/readmes/mini-misc.md +145 -0
- package/nvim/plugins/mini.nvim/readmes/mini-move.md +163 -0
- package/nvim/plugins/mini.nvim/readmes/mini-notify.md +175 -0
- package/nvim/plugins/mini.nvim/readmes/mini-operators.md +193 -0
- package/nvim/plugins/mini.nvim/readmes/mini-pairs.md +158 -0
- package/nvim/plugins/mini.nvim/readmes/mini-pick.md +340 -0
- package/nvim/plugins/mini.nvim/readmes/mini-sessions.md +164 -0
- package/nvim/plugins/mini.nvim/readmes/mini-snippets.md +373 -0
- package/nvim/plugins/mini.nvim/readmes/mini-splitjoin.md +194 -0
- package/nvim/plugins/mini.nvim/readmes/mini-starter.md +176 -0
- package/nvim/plugins/mini.nvim/readmes/mini-statusline.md +155 -0
- package/nvim/plugins/mini.nvim/readmes/mini-surround.md +190 -0
- package/nvim/plugins/mini.nvim/readmes/mini-tabline.md +156 -0
- package/nvim/plugins/mini.nvim/readmes/mini-test.md +175 -0
- package/nvim/plugins/mini.nvim/readmes/mini-trailspace.md +137 -0
- package/nvim/plugins/mini.nvim/readmes/mini-visits.md +243 -0
- package/nvim/plugins/mini.nvim/scripts/dual_log.sh +13 -0
- package/nvim/plugins/mini.nvim/scripts/dual_push.sh +15 -0
- package/nvim/plugins/mini.nvim/scripts/dual_release.sh +102 -0
- package/nvim/plugins/mini.nvim/scripts/dual_sync.sh +115 -0
- package/nvim/plugins/mini.nvim/scripts/init-deps-example.lua +59 -0
- package/nvim/plugins/mini.nvim/scripts/lint-filename-length.sh +16 -0
- package/nvim/plugins/mini.nvim/scripts/lintcommit-ci.sh +18 -0
- package/nvim/plugins/mini.nvim/scripts/lintcommit.lua +393 -0
- package/nvim/plugins/mini.nvim/scripts/minidoc.lua +57 -0
- package/nvim/plugins/mini.nvim/scripts/minimal_init.lua +28 -0
- package/nvim/plugins/mini.nvim/scripts/minitest.lua +4 -0
- package/package.json +16 -0
- package/pyproject.toml +43 -0
- package/yazi/init.lua +12 -0
- package/yazi/keymap.toml +114 -0
- package/yazi/lesskey +5 -0
- package/yazi/plugins/bookmarks.yazi/main.lua +86 -0
- package/yazi/plugins/cd-git-root.yazi/main.lua +31 -0
- package/yazi/plugins/smart-enter.yazi/main.lua +11 -0
- package/yazi/theme.toml +26 -0
- package/yazi/yazi.toml +15 -0
- package/zsh/.zshrc +145 -0
- package/zsh/starship.toml +20 -0
- package/zsh/zsh-patina.toml +2 -0
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
<p align="center"> <img src="https://github.com/nvim-mini/assets/blob/main/logo-2/logo-colors_readme.png?raw=true" alt="mini.colors" style="max-width:100%;border:solid 2px"/> </p>
|
|
2
|
+
|
|
3
|
+
### Tweak and save any color scheme
|
|
4
|
+
|
|
5
|
+
See more details in [Features](#features) and [Documentation](../doc/mini-colors.txt).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
> [!NOTE]
|
|
10
|
+
> This was previously hosted at a personal `echasnovski` GitHub account. It was transferred to a dedicated organization to improve long term project stability. See more details [here](https://github.com/nvim-mini/mini.nvim/discussions/1970).
|
|
11
|
+
|
|
12
|
+
⦿ This is a part of [mini.nvim](https://nvim-mini.org/mini.nvim) library. Please use [this link](https://nvim-mini.org/mini.nvim/readmes/mini-colors) if you want to mention this module.
|
|
13
|
+
|
|
14
|
+
⦿ All contributions (issues, pull requests, discussions, etc.) are done inside of 'mini.nvim'.
|
|
15
|
+
|
|
16
|
+
⦿ See [whole library documentation](https://nvim-mini.org/mini.nvim/doc/mini-nvim) to learn about general design principles, disable/configuration recipes, and more.
|
|
17
|
+
|
|
18
|
+
⦿ See [MiniMax](https://nvim-mini.org/MiniMax) for a full config example that uses this module.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
If you want to help this project grow but don't know where to start, check out [contributing guides of 'mini.nvim'](https://nvim-mini.org/mini.nvim/CONTRIBUTING) or leave a Github star for 'mini.nvim' project and/or any its standalone Git repositories.
|
|
23
|
+
|
|
24
|
+
## Demo
|
|
25
|
+
|
|
26
|
+
<!-- Demo source: https://github.com/nvim-mini/assets/blob/main/demo/demo-colors.mp4 -->
|
|
27
|
+
https://user-images.githubusercontent.com/24854248/232283566-9a51fa55-d20a-4650-8205-763b55e21366.mp4
|
|
28
|
+
|
|
29
|
+
## Features
|
|
30
|
+
|
|
31
|
+
- Create colorscheme object (see `:h MiniColors-colorscheme`): either manually (`:h MiniColors.as_colorscheme()`) or by querying present color schemes (including currently active one; see `:h MiniColors.get_colorscheme()`).
|
|
32
|
+
|
|
33
|
+
- Infer data about color scheme and/or modify based on it:
|
|
34
|
+
- Add transparency by removing background color (requires transparency in terminal emulator).
|
|
35
|
+
- Infer cterm attributes based on gui colors making it compatible with 'notermguicolors'.
|
|
36
|
+
- Resolve highlight group links.
|
|
37
|
+
- Compress by removing redundant highlight groups.
|
|
38
|
+
- Extract palette of used colors and/or infer terminal colors based on it.
|
|
39
|
+
|
|
40
|
+
- Modify colors to better fit your taste and/or goals:
|
|
41
|
+
- Apply any function to color hex string.
|
|
42
|
+
- Update channels (like lightness, saturation, hue, temperature, red, green, blue, etc.).
|
|
43
|
+
Use either own function or one of the implemented methods:
|
|
44
|
+
- Add value to channel or multiply it by coefficient. Like "add 10 to saturation of every color" or "multiply saturation by 2" to make colors more saturated (less gray).
|
|
45
|
+
- Invert. Like "invert lightness" to convert between dark/light theme.
|
|
46
|
+
- Set to one or more values (picks closest to current one). Like "set to one or two hues" to make mono- or dichromatic color scheme.
|
|
47
|
+
- Repel from certain source(s) with stronger effect for closer values. Like "repel from hue 30" to remove red color from color scheme. Repel hue (how much is removed) is configurable.
|
|
48
|
+
- Simulate color vision deficiency.
|
|
49
|
+
|
|
50
|
+
- Once color scheme is ready, either apply it to see effects right away or write it into a Lua file as a fully functioning separate color scheme.
|
|
51
|
+
|
|
52
|
+
- Experiment interactively with a feedback.
|
|
53
|
+
|
|
54
|
+
- Animate transition between color schemes either with `MiniColors.animate()` or with `:Colorscheme` user command.
|
|
55
|
+
|
|
56
|
+
- Convert within supported color spaces (`MiniColors.convert()`):
|
|
57
|
+
- Hex string.
|
|
58
|
+
- 8-bit number (terminal colors).
|
|
59
|
+
- RGB.
|
|
60
|
+
- Oklab, Oklch, Okhsl (https://bottosson.github.io/posts/oklab/).
|
|
61
|
+
|
|
62
|
+
## Tweak quick start
|
|
63
|
+
|
|
64
|
+
- Execute `:lua require('mini.colors').interactive()`.
|
|
65
|
+
- Experiment by writing calls to exposed color scheme methods and applying them with `<M-a>`. For more information, see `:h MiniColors-colorscheme-methods` and `:h MiniColors-recipes`.
|
|
66
|
+
- If you are happy with result, write color scheme with `<M-w>`. If not, reset to initial color scheme with `<M-r>`.
|
|
67
|
+
- If only some highlight groups can be made better, adjust them manually inside written color scheme file.
|
|
68
|
+
|
|
69
|
+
## Installation
|
|
70
|
+
|
|
71
|
+
This plugin can be installed as part of 'mini.nvim' library (**recommended**) or as a standalone Git repository.
|
|
72
|
+
|
|
73
|
+
There are two branches to install from:
|
|
74
|
+
|
|
75
|
+
- `main` (default, **recommended**) will have latest development version of plugin. All changes since last stable release should be perceived as being in beta testing phase (meaning they already passed alpha-testing and are moderately settled).
|
|
76
|
+
- `stable` will be updated only upon releases with code tested during public beta-testing phase in `main` branch.
|
|
77
|
+
|
|
78
|
+
Here are code snippets for some common installation methods (use only one):
|
|
79
|
+
|
|
80
|
+
<details>
|
|
81
|
+
<summary><b>(Recommended)</b> With <a href="https://neovim.io/doc/user/helptag.html?tag=vim.pack">vim.pack</a> (on Neovim 0.12 and newer)</summary>
|
|
82
|
+
|
|
83
|
+
**Full library**
|
|
84
|
+
|
|
85
|
+
Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
|
|
86
|
+
|
|
87
|
+
**Standalone plugin**
|
|
88
|
+
|
|
89
|
+
Main branch:
|
|
90
|
+
|
|
91
|
+
```lua
|
|
92
|
+
vim.pack.add({ 'https://github.com/nvim-mini/mini.colors' })
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Stable branch:
|
|
96
|
+
|
|
97
|
+
```lua
|
|
98
|
+
vim.pack.add({
|
|
99
|
+
{ src = 'https://github.com/nvim-mini/mini.colors', version = 'stable' },
|
|
100
|
+
})
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
</details>
|
|
104
|
+
|
|
105
|
+
<details>
|
|
106
|
+
<summary>With <a href="https://nvim-mini.org/mini.nvim/readmes/mini-deps">mini.deps</a> (before Neovim 0.12)</summary>
|
|
107
|
+
|
|
108
|
+
**Full library**
|
|
109
|
+
|
|
110
|
+
Follow [recommended 'mini.deps' installation](https://nvim-mini.org/mini.nvim/readmes/mini-deps#installation).
|
|
111
|
+
|
|
112
|
+
**Standalone plugin**:
|
|
113
|
+
|
|
114
|
+
Main branch:
|
|
115
|
+
|
|
116
|
+
```lua
|
|
117
|
+
add('nvim-mini/mini.colors')
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Stable branch:
|
|
121
|
+
|
|
122
|
+
```lua
|
|
123
|
+
add({ source = 'nvim-mini/mini.colors', checkout = 'stable' })
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
</details>
|
|
127
|
+
|
|
128
|
+
<details>
|
|
129
|
+
<summary>With <a href="https://github.com/folke/lazy.nvim">folke/lazy.nvim</a></summary>
|
|
130
|
+
|
|
131
|
+
**Full library**
|
|
132
|
+
|
|
133
|
+
Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
|
|
134
|
+
|
|
135
|
+
**Standalone plugin**
|
|
136
|
+
|
|
137
|
+
Main branch:
|
|
138
|
+
|
|
139
|
+
```lua
|
|
140
|
+
{ 'nvim-mini/mini.colors', version = false },
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Stable branch:
|
|
144
|
+
|
|
145
|
+
```lua
|
|
146
|
+
{ 'nvim-mini/mini.colors', version = '*' },
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
</details>
|
|
150
|
+
|
|
151
|
+
**Important**: no need to call `require('mini.colors').setup()`, but it can be done to improve usability.
|
|
152
|
+
|
|
153
|
+
**Note**: if you are on Windows, there might be problems with too long file paths (like `error: unable to create file <some file name>: Filename too long`). Try doing one of the following:
|
|
154
|
+
|
|
155
|
+
- Enable corresponding git global config value: `git config --system core.longpaths true`. Then try to reinstall.
|
|
156
|
+
- Install plugin in other place with shorter path.
|
|
157
|
+
|
|
158
|
+
## Default config
|
|
159
|
+
|
|
160
|
+
```lua
|
|
161
|
+
-- No need to copy this inside `setup()`. Will be used automatically.
|
|
162
|
+
{}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Similar plugins
|
|
166
|
+
|
|
167
|
+
- [rktjmp/lush.nvim](https://github.com/rktjmp/lush.nvim)
|
|
168
|
+
- [lifepillar/vim-colortemplate](https://github.com/lifepillar/vim-colortemplate)
|
|
169
|
+
- [tjdevries/colorbuddy.nvim](https://github.com/tjdevries/colorbuddy.nvim)
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
<p align="center"> <img src="https://github.com/nvim-mini/assets/blob/main/logo-2/logo-comment_readme.png?raw=true" alt="mini.comment" style="max-width:100%;border:solid 2px"/> </p>
|
|
2
|
+
|
|
3
|
+
### Comment lines
|
|
4
|
+
|
|
5
|
+
See more details in [Features](#features) and [Documentation](../doc/mini-comment.txt).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
> [!NOTE]
|
|
10
|
+
> This was previously hosted at a personal `echasnovski` GitHub account. It was transferred to a dedicated organization to improve long term project stability. See more details [here](https://github.com/nvim-mini/mini.nvim/discussions/1970).
|
|
11
|
+
|
|
12
|
+
⦿ This is a part of [mini.nvim](https://nvim-mini.org/mini.nvim) library. Please use [this link](https://nvim-mini.org/mini.nvim/readmes/mini-comment) if you want to mention this module.
|
|
13
|
+
|
|
14
|
+
⦿ All contributions (issues, pull requests, discussions, etc.) are done inside of 'mini.nvim'.
|
|
15
|
+
|
|
16
|
+
⦿ See [whole library documentation](https://nvim-mini.org/mini.nvim/doc/mini-nvim) to learn about general design principles, disable/configuration recipes, and more.
|
|
17
|
+
|
|
18
|
+
⦿ See [MiniMax](https://nvim-mini.org/MiniMax) for a full config example that uses this module.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
If you want to help this project grow but don't know where to start, check out [contributing guides of 'mini.nvim'](https://nvim-mini.org/mini.nvim/CONTRIBUTING) or leave a Github star for 'mini.nvim' project and/or any its standalone Git repositories.
|
|
23
|
+
|
|
24
|
+
## Demo
|
|
25
|
+
|
|
26
|
+
<!-- Demo source: https://github.com/nvim-mini/assets/blob/main/demo/demo-comment.mp4 -->
|
|
27
|
+
https://user-images.githubusercontent.com/24854248/173044250-1a8bceae-8f14-40e2-a678-31aca0cd6c1a.mp4
|
|
28
|
+
|
|
29
|
+
## Features
|
|
30
|
+
|
|
31
|
+
- Commenting in Normal mode respects `v:count` and is dot-repeatable.
|
|
32
|
+
- Comment structure is inferred from 'commentstring': either from current buffer or from locally active tree-sitter language. It can be customized via `options.custom_commentstring`.
|
|
33
|
+
- Handles both tab and space indenting (but not when they are mixed).
|
|
34
|
+
- Allows custom hooks before and after successful commenting.
|
|
35
|
+
- Configurable options for some nuanced behavior.
|
|
36
|
+
|
|
37
|
+
Notes:
|
|
38
|
+
|
|
39
|
+
- To use tree-sitter aware commenting, global value of 'commentstring' should be `''` (empty string). This is the default value, so make sure to not set it manually to a different value.
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
This plugin can be installed as part of 'mini.nvim' library (**recommended**) or as a standalone Git repository.
|
|
44
|
+
|
|
45
|
+
There are two branches to install from:
|
|
46
|
+
|
|
47
|
+
- `main` (default, **recommended**) will have latest development version of plugin. All changes since last stable release should be perceived as being in beta testing phase (meaning they already passed alpha-testing and are moderately settled).
|
|
48
|
+
- `stable` will be updated only upon releases with code tested during public beta-testing phase in `main` branch.
|
|
49
|
+
|
|
50
|
+
Here are code snippets for some common installation methods (use only one):
|
|
51
|
+
|
|
52
|
+
<details>
|
|
53
|
+
<summary><b>(Recommended)</b> With <a href="https://neovim.io/doc/user/helptag.html?tag=vim.pack">vim.pack</a> (on Neovim 0.12 and newer)</summary>
|
|
54
|
+
|
|
55
|
+
**Full library**
|
|
56
|
+
|
|
57
|
+
Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
|
|
58
|
+
|
|
59
|
+
**Standalone plugin**
|
|
60
|
+
|
|
61
|
+
Main branch:
|
|
62
|
+
|
|
63
|
+
```lua
|
|
64
|
+
vim.pack.add({ 'https://github.com/nvim-mini/mini.comment' })
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Stable branch:
|
|
68
|
+
|
|
69
|
+
```lua
|
|
70
|
+
vim.pack.add({
|
|
71
|
+
{ src = 'https://github.com/nvim-mini/mini.comment', version = 'stable' },
|
|
72
|
+
})
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
</details>
|
|
76
|
+
|
|
77
|
+
<details>
|
|
78
|
+
<summary>With <a href="https://nvim-mini.org/mini.nvim/readmes/mini-deps">mini.deps</a> (before Neovim 0.12)</summary>
|
|
79
|
+
|
|
80
|
+
**Full library**
|
|
81
|
+
|
|
82
|
+
Follow [recommended 'mini.deps' installation](https://nvim-mini.org/mini.nvim/readmes/mini-deps#installation).
|
|
83
|
+
|
|
84
|
+
**Standalone plugin**:
|
|
85
|
+
|
|
86
|
+
Main branch:
|
|
87
|
+
|
|
88
|
+
```lua
|
|
89
|
+
add('nvim-mini/mini.comment')
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Stable branch:
|
|
93
|
+
|
|
94
|
+
```lua
|
|
95
|
+
add({ source = 'nvim-mini/mini.comment', checkout = 'stable' })
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
</details>
|
|
99
|
+
|
|
100
|
+
<details>
|
|
101
|
+
<summary>With <a href="https://github.com/folke/lazy.nvim">folke/lazy.nvim</a></summary>
|
|
102
|
+
|
|
103
|
+
**Full library**
|
|
104
|
+
|
|
105
|
+
Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
|
|
106
|
+
|
|
107
|
+
**Standalone plugin**
|
|
108
|
+
|
|
109
|
+
Main branch:
|
|
110
|
+
|
|
111
|
+
```lua
|
|
112
|
+
{ 'nvim-mini/mini.comment', version = false },
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Stable branch:
|
|
116
|
+
|
|
117
|
+
```lua
|
|
118
|
+
{ 'nvim-mini/mini.comment', version = '*' },
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
</details>
|
|
122
|
+
|
|
123
|
+
**Important**: don't forget to call `require('mini.comment').setup()` to enable its functionality.
|
|
124
|
+
|
|
125
|
+
**Note**: if you are on Windows, there might be problems with too long file paths (like `error: unable to create file <some file name>: Filename too long`). Try doing one of the following:
|
|
126
|
+
|
|
127
|
+
- Enable corresponding git global config value: `git config --system core.longpaths true`. Then try to reinstall.
|
|
128
|
+
- Install plugin in other place with shorter path.
|
|
129
|
+
|
|
130
|
+
## Default config
|
|
131
|
+
|
|
132
|
+
```lua
|
|
133
|
+
-- No need to copy this inside `setup()`. Will be used automatically.
|
|
134
|
+
{
|
|
135
|
+
-- Options which control module behavior
|
|
136
|
+
options = {
|
|
137
|
+
-- Function to compute custom 'commentstring' (optional)
|
|
138
|
+
custom_commentstring = nil,
|
|
139
|
+
|
|
140
|
+
-- Whether to ignore blank lines when commenting
|
|
141
|
+
ignore_blank_line = false,
|
|
142
|
+
|
|
143
|
+
-- Whether to ignore blank lines in actions and textobject
|
|
144
|
+
start_of_line = false,
|
|
145
|
+
|
|
146
|
+
-- Whether to force single space inner padding for comment parts
|
|
147
|
+
pad_comment_parts = true,
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
-- Module mappings. Use `''` (empty string) to disable one.
|
|
151
|
+
mappings = {
|
|
152
|
+
-- Toggle comment (like `gcip` - comment inner paragraph) for both
|
|
153
|
+
-- Normal and Visual modes
|
|
154
|
+
comment = 'gc',
|
|
155
|
+
|
|
156
|
+
-- Toggle comment on current line
|
|
157
|
+
comment_line = 'gcc',
|
|
158
|
+
|
|
159
|
+
-- Toggle comment on visual selection
|
|
160
|
+
comment_visual = 'gc',
|
|
161
|
+
|
|
162
|
+
-- Define 'comment' textobject (like `dgc` - delete whole comment block)
|
|
163
|
+
-- Works also in Visual mode if mapping differs from `comment_visual`
|
|
164
|
+
textobject = 'gc',
|
|
165
|
+
},
|
|
166
|
+
|
|
167
|
+
-- Hook functions to be executed at certain stage of commenting
|
|
168
|
+
hooks = {
|
|
169
|
+
-- Before successful commenting. Does nothing by default.
|
|
170
|
+
pre = function() end,
|
|
171
|
+
-- After successful commenting. Does nothing by default.
|
|
172
|
+
post = function() end,
|
|
173
|
+
},
|
|
174
|
+
}
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Similar plugins
|
|
178
|
+
|
|
179
|
+
- Built-in commenting in Neovim>=0.10, see `:h commenting` (implemented with 'mini.comment' as reference)
|
|
180
|
+
- [numToStr/Comment.nvim](https://github.com/numToStr/Comment.nvim)
|
|
181
|
+
- [tpope/vim-commentary](https://github.com/tpope/vim-commentary)
|
|
182
|
+
- [preservim/nerdcommenter](https://github.com/preservim/nerdcommenter)
|
|
183
|
+
- [b3nj5m1n/kommentary](https://github.com/b3nj5m1n/kommentary)
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
<p align="center"> <img src="https://github.com/nvim-mini/assets/blob/main/logo-2/logo-completion_readme.png?raw=true" alt="mini.completion" style="max-width:100%;border:solid 2px"/> </p>
|
|
2
|
+
|
|
3
|
+
### Autocompletion and signature help plugin
|
|
4
|
+
|
|
5
|
+
- Async (with customizable 'debounce' delay) 'two-stage chain completion': first builtin LSP, then configurable fallback.
|
|
6
|
+
- Has functionality for completion item info and function signature (both in floating window appearing after customizable delay).
|
|
7
|
+
|
|
8
|
+
See more details in [Features](#features) and [Documentation](../doc/mini-completion.txt).
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
> [!NOTE]
|
|
13
|
+
> This was previously hosted at a personal `echasnovski` GitHub account. It was transferred to a dedicated organization to improve long term project stability. See more details [here](https://github.com/nvim-mini/mini.nvim/discussions/1970).
|
|
14
|
+
|
|
15
|
+
⦿ This is a part of [mini.nvim](https://nvim-mini.org/mini.nvim) library. Please use [this link](https://nvim-mini.org/mini.nvim/readmes/mini-completion) if you want to mention this module.
|
|
16
|
+
|
|
17
|
+
⦿ All contributions (issues, pull requests, discussions, etc.) are done inside of 'mini.nvim'.
|
|
18
|
+
|
|
19
|
+
⦿ See [whole library documentation](https://nvim-mini.org/mini.nvim/doc/mini-nvim) to learn about general design principles, disable/configuration recipes, and more.
|
|
20
|
+
|
|
21
|
+
⦿ See [MiniMax](https://nvim-mini.org/MiniMax) for a full config example that uses this module.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
If you want to help this project grow but don't know where to start, check out [contributing guides of 'mini.nvim'](https://nvim-mini.org/mini.nvim/CONTRIBUTING) or leave a Github star for 'mini.nvim' project and/or any its standalone Git repositories.
|
|
26
|
+
|
|
27
|
+
## Demo
|
|
28
|
+
|
|
29
|
+
<!-- Demo source: https://github.com/nvim-mini/assets/blob/main/demo/demo-completion.mp4 -->
|
|
30
|
+
https://github.com/user-attachments/assets/dd3fe2e2-9795-47c1-9479-0b3fa14c6e75
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
|
|
34
|
+
- Two-stage chain completion:
|
|
35
|
+
- First stage is an LSP completion. Supports `additionalTextEdits` (like auto-import, etc.) and snippets (see ["Snippets"](#snippets)) (best results require ['mini.snippets'](https://nvim-mini.org/mini.nvim/readmes/mini-snippets) dependency).
|
|
36
|
+
- If first stage is not set up or resulted into no candidates, fallback action is executed. The most tested actions are Neovim's built-in insert completion.
|
|
37
|
+
- Automatic display in floating window of completion item info (via 'completionItem/resolve' request) and signature help (with highlighting of active parameter if LSP server provides such information). Scrolling is possible in both info/signature window (`<C-f>` / `<C-b>` by default).
|
|
38
|
+
- Automatic actions are done after some configurable amount of delay. This reduces computational load and allows fast typing (completion and signature help) and item selection (item info)
|
|
39
|
+
- User can force two-stage/fallback completion (`<C-Space>` / `<A-Space>` by default).
|
|
40
|
+
- Customizable highlighting of LSP items. Requires Neovim>=0.11. Supported:
|
|
41
|
+
- Item label. By default only checks if item is marked as deprecated and sets `MiniCompletionDeprecated` highlight group.
|
|
42
|
+
- LSP kind (like "Function", "Keyword", etc.). Requires enabled ['mini.icons'](https://nvim-mini.org/mini.nvim/readmes/mini-icons) (uses its "lsp" category)
|
|
43
|
+
|
|
44
|
+
## Dependencies
|
|
45
|
+
|
|
46
|
+
For full experience needs (still works without any of suggestions):
|
|
47
|
+
|
|
48
|
+
- Enabled ['mini.icons'](https://nvim-mini.org/mini.nvim/readmes/mini-icons) module to highlight LSP kind (requires Neovim>=0.11). If absent, `MiniCompletion.default_process_items()` does not add highlighting. Also take a look at `MiniIcons.tweak_lsp_kind()`.
|
|
49
|
+
- Enabled ['mini.snippets'](https://nvim-mini.org/mini.nvim/readmes/mini-snippets) module for better snippet handling (**much recommended**). If absent and custom snippet insert is not configured, `vim.snippet.expand()` is used on Neovim>=0.10 (nothing extra is done on earlier versions). See `:h MiniCompletion.default_snippet_insert()`.
|
|
50
|
+
|
|
51
|
+
## Snippets
|
|
52
|
+
|
|
53
|
+
As per LSP specification, some completion items can be supplied in the form of snippet - a template with both pre-defined text and places (called "tabstops") for user to interactively change/add text during snippet session.
|
|
54
|
+
|
|
55
|
+
In 'mini.completion' items that will insert snippet have "S" symbol shown in the popup. To actually insert a snippet:
|
|
56
|
+
|
|
57
|
+
- Select an item via `<C-n>` / `<C-p>`. This will insert item's label (usually not full snippet) first to reduce visual flicker. The full snippet text will be shown in info window if LSP server doesn't provide its own info for an item.
|
|
58
|
+
|
|
59
|
+
- Press `<C-y>` or attempt inserting a non-keyword character (like `<CR>`; new character will be removed). It will clear text from previous step, set cursor, and call `lsp_completion.snippet_insert` with snippet text.
|
|
60
|
+
|
|
61
|
+
- Press `<C-e>` to cancel snippet insert and properly end completion.
|
|
62
|
+
|
|
63
|
+
See `:h MiniCompletion.default_snippet_insert()` for overview of how to work with inserted snippets.
|
|
64
|
+
|
|
65
|
+
## Installation
|
|
66
|
+
|
|
67
|
+
This plugin can be installed as part of 'mini.nvim' library (**recommended**) or as a standalone Git repository.
|
|
68
|
+
|
|
69
|
+
There are two branches to install from:
|
|
70
|
+
|
|
71
|
+
- `main` (default, **recommended**) will have latest development version of plugin. All changes since last stable release should be perceived as being in beta testing phase (meaning they already passed alpha-testing and are moderately settled).
|
|
72
|
+
- `stable` will be updated only upon releases with code tested during public beta-testing phase in `main` branch.
|
|
73
|
+
|
|
74
|
+
Here are code snippets for some common installation methods (use only one):
|
|
75
|
+
|
|
76
|
+
<details>
|
|
77
|
+
<summary><b>(Recommended)</b> With <a href="https://neovim.io/doc/user/helptag.html?tag=vim.pack">vim.pack</a> (on Neovim 0.12 and newer)</summary>
|
|
78
|
+
|
|
79
|
+
**Full library**
|
|
80
|
+
|
|
81
|
+
Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
|
|
82
|
+
|
|
83
|
+
**Standalone plugin**
|
|
84
|
+
|
|
85
|
+
Main branch:
|
|
86
|
+
|
|
87
|
+
```lua
|
|
88
|
+
vim.pack.add({ 'https://github.com/nvim-mini/mini.completion' })
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Stable branch:
|
|
92
|
+
|
|
93
|
+
```lua
|
|
94
|
+
vim.pack.add({
|
|
95
|
+
{ src = 'https://github.com/nvim-mini/mini.completion', version = 'stable' },
|
|
96
|
+
})
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
</details>
|
|
100
|
+
|
|
101
|
+
<details>
|
|
102
|
+
<summary>With <a href="https://nvim-mini.org/mini.nvim/readmes/mini-deps">mini.deps</a> (before Neovim 0.12)</summary>
|
|
103
|
+
|
|
104
|
+
**Full library**
|
|
105
|
+
|
|
106
|
+
Follow [recommended 'mini.deps' installation](https://nvim-mini.org/mini.nvim/readmes/mini-deps#installation).
|
|
107
|
+
|
|
108
|
+
**Standalone plugin**:
|
|
109
|
+
|
|
110
|
+
Main branch:
|
|
111
|
+
|
|
112
|
+
```lua
|
|
113
|
+
add('nvim-mini/mini.completion')
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Stable branch:
|
|
117
|
+
|
|
118
|
+
```lua
|
|
119
|
+
add({ source = 'nvim-mini/mini.completion', checkout = 'stable' })
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
</details>
|
|
123
|
+
|
|
124
|
+
<details>
|
|
125
|
+
<summary>With <a href="https://github.com/folke/lazy.nvim">folke/lazy.nvim</a></summary>
|
|
126
|
+
|
|
127
|
+
**Full library**
|
|
128
|
+
|
|
129
|
+
Follow ['mini.nvim' installation](https://nvim-mini.org/mini.nvim#installation).
|
|
130
|
+
|
|
131
|
+
**Standalone plugin**
|
|
132
|
+
|
|
133
|
+
Main branch:
|
|
134
|
+
|
|
135
|
+
```lua
|
|
136
|
+
{ 'nvim-mini/mini.completion', version = false },
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Stable branch:
|
|
140
|
+
|
|
141
|
+
```lua
|
|
142
|
+
{ 'nvim-mini/mini.completion', version = '*' },
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
</details>
|
|
146
|
+
|
|
147
|
+
**Important**: don't forget to call `require('mini.completion').setup()` to enable its functionality.
|
|
148
|
+
|
|
149
|
+
**Note**: if you are on Windows, there might be problems with too long file paths (like `error: unable to create file <some file name>: Filename too long`). Try doing one of the following:
|
|
150
|
+
|
|
151
|
+
- Enable corresponding git global config value: `git config --system core.longpaths true`. Then try to reinstall.
|
|
152
|
+
- Install plugin in other place with shorter path.
|
|
153
|
+
|
|
154
|
+
## Default config
|
|
155
|
+
|
|
156
|
+
```lua
|
|
157
|
+
-- No need to copy this inside `setup()`. Will be used automatically.
|
|
158
|
+
{
|
|
159
|
+
-- Delay (debounce type, in ms) between certain Neovim event and action.
|
|
160
|
+
-- This can be used to (virtually) disable certain automatic actions by
|
|
161
|
+
-- setting very high delay time (like 10^7).
|
|
162
|
+
delay = { completion = 100, info = 100, signature = 50 },
|
|
163
|
+
|
|
164
|
+
-- Configuration for action windows:
|
|
165
|
+
-- - `height` and `width` are maximum dimensions.
|
|
166
|
+
-- - `border` defines border (as in `nvim_open_win()`; default "single").
|
|
167
|
+
window = {
|
|
168
|
+
info = { height = 25, width = 80, border = nil },
|
|
169
|
+
signature = { height = 25, width = 80, border = nil },
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
-- Way of how module does LSP completion
|
|
173
|
+
lsp_completion = {
|
|
174
|
+
-- `source_func` should be one of 'completefunc' or 'omnifunc'.
|
|
175
|
+
source_func = 'completefunc',
|
|
176
|
+
|
|
177
|
+
-- `auto_setup` should be boolean indicating if LSP completion is set up
|
|
178
|
+
-- on every `BufEnter` event.
|
|
179
|
+
auto_setup = true,
|
|
180
|
+
|
|
181
|
+
-- A function which takes LSP 'textDocument/completion' response items
|
|
182
|
+
-- (each with `client_id` field for item's server) and word to complete.
|
|
183
|
+
-- Output should be a table of the same nature as input. Common use case
|
|
184
|
+
-- is custom filter/sort. Default: `default_process_items`
|
|
185
|
+
process_items = nil,
|
|
186
|
+
|
|
187
|
+
-- A function which takes a snippet as string and inserts it at cursor.
|
|
188
|
+
-- Default: `default_snippet_insert` which tries to use 'mini.snippets'
|
|
189
|
+
-- and falls back to `vim.snippet.expand` (on Neovim>=0.10).
|
|
190
|
+
snippet_insert = nil,
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
-- Fallback action as function/string. Executed in Insert mode.
|
|
194
|
+
-- To use built-in completion (`:h ins-completion`), set its mapping as
|
|
195
|
+
-- string. Example: set '<C-x><C-l>' for 'whole lines' completion.
|
|
196
|
+
fallback_action = '<C-n>',
|
|
197
|
+
|
|
198
|
+
-- Module mappings. Use `''` (empty string) to disable one. Some of them
|
|
199
|
+
-- might conflict with system mappings.
|
|
200
|
+
mappings = {
|
|
201
|
+
-- Force two-step/fallback completions
|
|
202
|
+
force_twostep = '<C-Space>',
|
|
203
|
+
force_fallback = '<A-Space>',
|
|
204
|
+
|
|
205
|
+
-- Scroll info/signature window down/up. When overriding, check for
|
|
206
|
+
-- conflicts with built-in keys for popup menu (like `<C-u>`/`<C-o>`
|
|
207
|
+
-- for 'completefunc'/'omnifunc' source function; or `<C-n>`/`<C-p>`).
|
|
208
|
+
scroll_down = '<C-f>',
|
|
209
|
+
scroll_up = '<C-b>',
|
|
210
|
+
},
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Similar plugins
|
|
215
|
+
|
|
216
|
+
- [hrsh7th/nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
|
|
217
|
+
- [Shougo/ddc.vim](https://github.com/Shougo/ddc.vim)
|