mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
readme: move "advanced usage" next to "standalone usage"
This commit is contained in:
parent
80ed86649b
commit
cf487e09af
1 changed files with 21 additions and 17 deletions
38
README.md
38
README.md
|
@ -130,6 +130,8 @@ you're using.
|
||||||
|
|
||||||
For more detail, see the [Usage](https://nix-community.github.io/nixvim/user-guide/install.html#usage) section of our documentation.
|
For more detail, see the [Usage](https://nix-community.github.io/nixvim/user-guide/install.html#usage) section of our documentation.
|
||||||
|
|
||||||
|
### Standalone Usage
|
||||||
|
|
||||||
If you want to use it standalone, you can use the `makeNixvim` function:
|
If you want to use it standalone, you can use the `makeNixvim` function:
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
|
@ -198,6 +200,25 @@ can use the following:
|
||||||
You can then run neovim using `nix run .# -- <file>`. This can be useful to test
|
You can then run neovim using `nix run .# -- <file>`. This can be useful to test
|
||||||
config changes easily.
|
config changes easily.
|
||||||
|
|
||||||
|
### Advanced Usage
|
||||||
|
|
||||||
|
You may want more control over the nixvim modules, like:
|
||||||
|
|
||||||
|
- Splitting your configuration in multiple files
|
||||||
|
- Adding custom nix modules to enhance nixvim
|
||||||
|
- Change the nixpkgs used by nixvim
|
||||||
|
|
||||||
|
In this case, you can use the `makeNixvimWithModule` function.
|
||||||
|
|
||||||
|
It takes a set with the following keys:
|
||||||
|
- `pkgs`: The nixpkgs to use (defaults to the nixpkgs pointed at by the nixvim flake)
|
||||||
|
- `module`: The nix module definition used to extend nixvim.
|
||||||
|
This is useful to pass additional module machinery like `options` or `imports`.
|
||||||
|
- `extraSpecialArgs`: Extra arguments to pass to the modules when using functions.
|
||||||
|
Can be `self` in a flake, for example.
|
||||||
|
|
||||||
|
For more detail, see the [Standalone Usage](https://nix-community.github.io/nixvim/modules/standalone.html) section of our documentation.
|
||||||
|
|
||||||
### With a `devShell`
|
### With a `devShell`
|
||||||
|
|
||||||
You can also use nixvim to define an instance which will only be available inside a Nix `devShell`:
|
You can also use nixvim to define an instance which will only be available inside a Nix `devShell`:
|
||||||
|
@ -217,23 +238,6 @@ in pkgs.mkShell {
|
||||||
|
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
### Advanced Usage
|
|
||||||
|
|
||||||
You may want more control over the nixvim modules, like:
|
|
||||||
|
|
||||||
- Splitting your configuration in multiple files
|
|
||||||
- Adding custom nix modules to enhance nixvim
|
|
||||||
- Change the nixpkgs used by nixvim
|
|
||||||
|
|
||||||
In this case, you can use the `makeNixvimWithModule` function.
|
|
||||||
|
|
||||||
It takes a set with the following keys:
|
|
||||||
- `pkgs`: The nixpkgs to use (defaults to the nixpkgs pointed at by the nixvim flake)
|
|
||||||
- `module`: The nix module definition used to extend nixvim.
|
|
||||||
This is useful to pass additional module machinery like `options` or `imports`.
|
|
||||||
- `extraSpecialArgs`: Extra arguments to pass to the modules when using functions.
|
|
||||||
Can be `self` in a flake, for example.
|
|
||||||
|
|
||||||
## How does it work?
|
## How does it work?
|
||||||
When you build the module (probably using home-manager), it will install all
|
When you build the module (probably using home-manager), it will install all
|
||||||
your plugins and generate a lua config for NeoVim with all the options
|
your plugins and generate a lua config for NeoVim with all the options
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue