Skip to content

Commit 433673a

Browse files
committed
plugins/cmp: add description to elevate autoEnableSource info
1 parent b993182 commit 433673a

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

plugins/completion/cmp/default.nix

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,46 @@ helpers.neovim-plugin.mkNeovimPlugin config {
1616

1717
maintainers = [ maintainers.GaetanLepage ];
1818

19+
description = ''
20+
### Completion Source Installation
21+
22+
If `plugins.cmp.autoEnableSources` is `true` Nixivm will automatically enable the corresponding source
23+
plugins. This is the default behavior, but will work only when this option is set to a list.
24+
25+
If you use a raw lua string or set `plugins.cmp.autoEnableSources` to `false`, you will need to explicitly enable the relevant source plugins in
26+
your nixvim configuration.
27+
28+
#### With auto-enabled sources
29+
```nix
30+
plugins.cmp = {
31+
autoEnableSources = true;
32+
settings.sources = [
33+
{ name = "nvim_lsp"; }
34+
{ name = "path"; }
35+
{ name = "buffer"; }
36+
];
37+
};
38+
```
39+
40+
#### Without auto-enabled sources
41+
```nix
42+
plugins = {
43+
cmp = {
44+
autoEnableSources = false;
45+
settings.sources = [
46+
{ name = "nvim_lsp"; }
47+
{ name = "path"; }
48+
{ name = "buffer"; }
49+
];
50+
};
51+
cmp-nvim-lsp.enable = true;
52+
cmp-path.enable = true;
53+
cmp-buffer.enable = true;
54+
};
55+
56+
```
57+
'';
58+
1959
imports = [
2060
# Introduced on 2024 February 21
2161
# TODO: remove ~June 2024

0 commit comments

Comments
 (0)