mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-11-10 23:45:31 +00:00
docs: clean up documentation directory
This commit is contained in:
parent
b8d2c23eaf
commit
294b712c15
10 changed files with 100 additions and 60 deletions
47
docs/manual/custom-configs.adoc
Normal file
47
docs/manual/custom-configs.adoc
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
[[ch-custom-configuration]]
|
||||
== Custom Configuration
|
||||
|
||||
Custom configuration is done with the `neovimConfiguration` function. It takes in the configuration as a module. The output of the configuration function is an attrset.
|
||||
|
||||
[source,nix]
|
||||
----
|
||||
{
|
||||
options = "The options that were available to configure";
|
||||
config = "The outputted configuration";
|
||||
pkgs = "The package set used to evaluate the module";
|
||||
neovim = "The built neovim package";
|
||||
}
|
||||
----
|
||||
|
||||
The following is an example of a barebones vim configuration with the default theme enabled.
|
||||
|
||||
[source,nix]
|
||||
----
|
||||
{
|
||||
inputs.neovim-flake = {
|
||||
url = "github:notashelf/neovim-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {nixpkgs, neovim-flake, ...}: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
configModule = {
|
||||
# Add any custom options (and feel free to upstream them!)
|
||||
# options = ...
|
||||
|
||||
config.vim = {
|
||||
theme.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
customNeovim = neovim-flake.lib.neovimConfiguration {
|
||||
modules = [configModule];
|
||||
inherit pkgs;
|
||||
};
|
||||
in {
|
||||
packages.${system}.neovim = customNeovim.neovim;
|
||||
};
|
||||
}
|
||||
----
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue