docs(readme): add usage example
This commit is contained in:
parent
0dbe093453
commit
b674635702
1 changed files with 30 additions and 0 deletions
30
README.md
30
README.md
|
@ -14,6 +14,36 @@ which takes an attrset with the following arguments:
|
|||
- Plugins: List of Neovim plugins and/or luarocks packages.
|
||||
Defaults to an empty list.
|
||||
|
||||
Example:
|
||||
|
||||
Import this flake:
|
||||
|
||||
```nix
|
||||
#flake.nix
|
||||
inputs.gen-luarc.url = "github:mrcjkb/nix-gen-luarc-json";
|
||||
```
|
||||
|
||||
Add the overlay:
|
||||
|
||||
```nix
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
gen-luarc.overlays.default
|
||||
];
|
||||
};
|
||||
```
|
||||
|
||||
Generate a `.luarc.json` in your `shellHook`:
|
||||
|
||||
```nix
|
||||
shellHook = let
|
||||
luarc = pkgs.mk-luarc-json { plugins = with pkgs.vimPlugins; [ nvim-treesitter ]; };
|
||||
in /* bash */ ''
|
||||
ln -fs {luarc} .luarc.json
|
||||
'';
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
This flake is [licensed according to GPL version 2](./LICENSE),
|
||||
|
|
Loading…
Reference in a new issue