1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-12-18 15:01:13 +01:00

docs: format nix examples in options

This commit is contained in:
Zexin Yuan 2025-12-12 19:26:32 +08:00 committed by Gaétan Lepage
parent d52007581e
commit 297e2e0b65
17 changed files with 293 additions and 265 deletions

View file

@ -28,32 +28,35 @@ lib.nixvim.plugins.mkNeovimPlugin {
#### With auto-enabled sources
```nix
plugins.cmp = {
autoEnableSources = true;
settings.sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "buffer"; }
];
};
```
#### Without auto-enabled sources
```nix
plugins = {
cmp = {
autoEnableSources = false;
{
plugins.cmp = {
autoEnableSources = true;
settings.sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "buffer"; }
];
};
cmp-nvim-lsp.enable = true;
cmp-path.enable = true;
cmp-buffer.enable = true;
};
}
```
#### Without auto-enabled sources
```nix
{
plugins = {
cmp = {
autoEnableSources = false;
settings.sources = [
{ name = "nvim_lsp"; }
{ name = "path"; }
{ name = "buffer"; }
];
};
cmp-nvim-lsp.enable = true;
cmp-path.enable = true;
cmp-buffer.enable = true;
};
}
```
'';

View file

@ -41,6 +41,7 @@ let
if you don't want to see `buffer` source items while `nvim-lsp` source is available:
```nix
{
sources = [
{
name = "nvim_lsp";
@ -51,6 +52,7 @@ let
group_index = 2;
}
];
}
```
'';