Skip to content

Commit 3b9fa80

Browse files
authored
feat(templates.neovim): give the neovim module a better template (#214)
demo more of the features, make it follow the style of kickstart-nvim but with lze and nix, make it lazily loaded.
1 parent c6acb3b commit 3b9fa80

File tree

16 files changed

+1050
-615
lines changed

16 files changed

+1050
-615
lines changed

templates/neovim/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Neovim module
2+
3+
This is a demonstration of the [neovim module](https://birdeehub.github.io/nix-wrapper-modules/neovim.html)
4+
5+
It makes use of the tips in the [tips and tricks](https://birdeehub.github.io/nix-wrapper-modules/neovim.html#tips-and-tricks) section of the documentation.
6+
7+
It uses [lze](https://github.com/BirdeeHub/lze) for lazy loading of the configuration.
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`).
12+
13+
This configuration is 1 `lua` file, however the whole set of directories from a normal `neovim` configuration directory are available.
14+
15+
To see what directories you can put stuff in, see: [:help 'rtp'](https://neovim.io/doc/user/options.html#'rtp')
16+
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).
18+
19+
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+
21+
To initialize this template into the current directory, run:
22+
23+
```bash
24+
nix flake init -t github:BirdeeHub/nix-wrapper-modules#neovim
25+
```
26+
27+
If you are using `zsh` you may need to escape the `#`

templates/neovim/flake.nix

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
{
2-
description = "Flake exporting a configured package using wlib.evalModule";
2+
description = "Flake exporting a configured neovim package";
33
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
44
inputs.wrappers.url = "github:BirdeeHub/nix-wrapper-modules";
55
inputs.wrappers.inputs.nixpkgs.follows = "nixpkgs";
6-
inputs.nvim-treesitter-textobjects = {
7-
url = "github:nvim-treesitter/nvim-treesitter-textobjects/main";
6+
# Demo on fetching plugins from outside nixpkgs
7+
inputs.plugins-lze = {
8+
url = "github:BirdeeHub/lze";
9+
flake = false;
10+
};
11+
# These 2 are already in nixpkgs, however this ensures you always fetch the most up to date version!
12+
inputs.plugins-lzextras = {
13+
url = "github:BirdeeHub/lzextras";
814
flake = false;
915
};
1016
outputs =

templates/neovim/ftplugin/README.md

Lines changed: 0 additions & 3 deletions
This file was deleted.

templates/neovim/ftplugin/lua.lua

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)