README: add devShell example

This commit is contained in:
Pedro Alves 2023-03-17 09:07:35 +00:00
parent 02fcb49a03
commit 5c853ff9ff

View file

@ -140,12 +140,30 @@ can use the following:
});
}
```
</details>
You can then run neovim using `nix run .# -- <file>`. This can be useful to test
config changes easily.
### With a `devShell`
You can also use nixvim to define an instance which will only be available inside of a Nix `devShell`:
<details>
<summary>devShell configuration</summary>
```nix
let
nvim = nixvim.legacyPackages.x86_64-linux.makeNixvim {
plugins.lsp.enable = true;
};
in pkgs.mkShell {
buildInputs = [nvim];
};
```
</details>
### Advanced Usage
You may want more control over the nixvim modules like: