You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: templates/neovim/README.md
+61-7Lines changed: 61 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,32 +4,86 @@ This is a demonstration of the [neovim module](https://birdeehub.github.io/nix-w
4
4
5
5
It makes use of the tips in the [tips and tricks](https://birdeehub.github.io/nix-wrapper-modules/wrapperModules/neovim.html#tips-and-tricks) section of the documentation.
6
6
7
-
It uses [lze](https://github.com/BirdeeHub/lze) for lazy loading of the configuration.
7
+
This template configuration is by no means a perfect, complete configuration.
8
8
9
-
It is by no means a perfect, complete configuration.
10
-
11
-
However, it is plenty to start on, and covers some interesting ways to use the module (and `lze`).
9
+
However, it is plenty to start on, and covers some interesting ways to use the module (and how to lazily load plugins and config).
12
10
13
11
This configuration is 1 `lua` file, however the whole set of directories from a normal `neovim` configuration directory are available.
14
12
15
13
To see what directories you can put stuff in, see: [:help 'rtp'](https://neovim.io/doc/user/options.html#'rtp')
16
14
17
-
The main reason it is in 1 file is that, it is following the style of [kickstart.nvim](https://github.com/nvim-lua/kickstart.nvim).
15
+
The main reason it is in 1 file is that it is following the style of [kickstart.nvim](https://github.com/nvim-lua/kickstart.nvim).
18
16
19
17
The other reason it is in 1 file, is that it makes it a cleaner experience to init this template into an existing configuration.
20
18
21
-
To initialize this template into the current directory, run:
19
+
This template config uses [lze](https://github.com/BirdeeHub/lze) for lazy loading of the configuration.
20
+
21
+
You may also be interested in [lz.n](https://github.com/lumen-oss/lz.n) for this purpose.
22
+
23
+
Both achieve the same general result and main interface,
24
+
but have different underlying implementations and thus have different handler features.
25
+
26
+
Both are fantastic for lazy loading with both nix and the builtin plugin manager.
27
+
28
+
You may also decide you don't need lazy loading at all. This is fine, many plugins mostly handle that themselves.
29
+
30
+
To initialize this template flake into the current directory, run:
There are a lot of other ways to install it as well, see [the getting started documentation](https://birdeehub.github.io/nix-wrapper-modules/md/getting-started.html)
59
+
60
+
You may also wish to view the `flake.nix` of this template, as it demonstrates some of those things when setting up its outputs.
61
+
62
+
---
63
+
64
+
The nix in this template is not as simple as it could possibly be, as it demonstrates some things
65
+
from the [tips and tricks](https://birdeehub.github.io/nix-wrapper-modules/wrapperModules/neovim.html#tips-and-tricks) section of the documentation.
66
+
67
+
If you wanted as simple as possible, you could use something more like the following as your `module.nix`
68
+
69
+
```nix
70
+
{ wlib, config, pkgs, lib, ... }:
71
+
imports = [ wlib.wrapperModules.neovim ];
72
+
specs.general = with pkgs.vimPlugins; [
73
+
# plugins which are loaded at startup ...
74
+
];
75
+
specs.lazy = {
76
+
lazy = true;
77
+
data = with pkgs.vimPlugins; [
78
+
# plugins which are not loaded until you vim.cmd.packadd them ...
79
+
];
80
+
};
81
+
extraPackages = with pkgs; [
82
+
# lsps, formatters, etc...
83
+
];
84
+
settings.config_directory = ./.; # or lib.generators.mkLuaInline "vim.fn.stdpath('config')";
85
+
}
86
+
```
87
+
88
+
At the same time, you may find that the `module.nix` file from this template is not massively more complex than that either,
0 commit comments