mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-12-17 17:31:18 +00:00
docs/manual: add more details to existing documentation pages
This commit is contained in:
parent
96c568f99b
commit
0c848869cf
7 changed files with 131 additions and 39 deletions
|
|
@ -1,7 +1,10 @@
|
|||
[[ch-hm-module]]
|
||||
== Home Manager
|
||||
|
||||
The Home Manager module allows us to customize the different `vim` options. To use it, we first add the input flake.
|
||||
The Home Manager module allows us to customize the different `vim` options from inside the home-manager configuration
|
||||
and it is the preferred way of configuring neovim-flake, both on NixOS and non-NixOS systems.
|
||||
|
||||
To use it, we first add the input flake.
|
||||
|
||||
[source,nix]
|
||||
----
|
||||
|
|
@ -10,20 +13,49 @@ The Home Manager module allows us to customize the different `vim` options. To u
|
|||
url = github:notashelf/neovim-flake;
|
||||
# you can override input nixpkgs
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
# you can also override individual plugins
|
||||
# i.e inputs.obsidian-nvim.follows = "obsidian-nvim"; # <- obsidian nvim needs to be in your inputs
|
||||
};
|
||||
}
|
||||
----
|
||||
|
||||
Followed by importing the HM module.
|
||||
Followed by importing the home-manager module somewhere in your configuration.
|
||||
|
||||
[source,nix]
|
||||
----
|
||||
{
|
||||
imports = [ neovim-flake.homeManagerModules.default ];
|
||||
# assuming neovim-flake is in your inputs and inputs is in the argset
|
||||
imports = [ inputs.neovim-flake.homeManagerModules.default ];
|
||||
}
|
||||
----
|
||||
|
||||
Then we should be able to use the given module. E.g.
|
||||
An example installation for standalone home-manager would look like this:
|
||||
|
||||
[source,nix]
|
||||
----
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager.url = "github:nix-community/home-manager";
|
||||
stylix.url = "github:notashelf/neovim-flake";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, neovim-flake ... }: let
|
||||
system = "x86_64-linux"; in {
|
||||
# ↓ this is the home-manager output in the flake schema
|
||||
homeConfigurations."yourUsername»" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
modules = [
|
||||
neovim-flake.homeManagerModules.default # <- this imports the home-manager module that provides the options
|
||||
./home.nix # your home-manager configuration, probably where you will want to add programs.neovim-flake options
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
----
|
||||
|
||||
Once the module is imported, we will be able to define the following options (and much more) from inside the
|
||||
home-manager configuration.
|
||||
|
||||
[source,nix]
|
||||
----
|
||||
|
|
@ -31,7 +63,8 @@ Then we should be able to use the given module. E.g.
|
|||
programs.neovim-flake = {
|
||||
|
||||
enable = true;
|
||||
# your settings need to go into the settings attrset
|
||||
# your settings need to go into the settings attribute set
|
||||
# most settings are documented in the appendix
|
||||
settings = {
|
||||
vim.viAlias = false;
|
||||
vim.vimAlias = true;
|
||||
|
|
@ -43,4 +76,10 @@ Then we should be able to use the given module. E.g.
|
|||
}
|
||||
----
|
||||
|
||||
[NOTE]
|
||||
====
|
||||
You may find all avaliable options in the https://notashelf.github.io/neovim-flake/options[appendix]
|
||||
====
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue