docs: clean up documentation directory

This commit is contained in:
NotAShelf 2023-06-06 03:01:44 +03:00
commit 294b712c15
No known key found for this signature in database
GPG key ID: F0D14CCB5ED5AA22
10 changed files with 100 additions and 60 deletions

View file

@ -1,44 +0,0 @@
[[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.
[source,nix]
----
{
neovim-flake = {
url = github:notashelf/neovim-flake;
# you can override input nixpkgs
inputs.nixpkgs.follows = "nixpkgs";
};
}
----
Followed by importing the HM module.
[source,nix]
----
{
imports = [ neovim-flake.homeManagerModules.default ];
}
----
Then we should be able to use the given module. E.g.
[source,nix]
----
{
programs.neovim-flake = {
enable = true;
# your settings need to go into the settings attrset
settings = {
vim.viAlias = false;
vim.vimAlias = true;
vim.lsp = {
enable = true;
};
};
};
}
----

View file

@ -16,12 +16,12 @@
</para>
</preface>
<xi:include href="try-it-out.xml"/>
<xi:include href="default-configs.xml"/>
<xi:include href="custom-configs.xml"/>
<xi:include href="custom-plugins.xml"/>
<xi:include href="home-manager.xml"/>
<xi:include href="languages.xml"/>
<xi:include href="manual/try-it-out.xml"/>
<xi:include href="manual/default-configs.xml"/>
<xi:include href="manual/custom-configs.xml"/>
<xi:include href="manual/custom-plugins.xml"/>
<xi:include href="manual/home-manager.xml"/>
<xi:include href="manual/languages.xml"/>
<appendix xml:id="ch-options">
<title>Configuration Options</title>
<xi:include href="./nmd-result/neovim-flake-options.xml" />

View file

@ -0,0 +1,80 @@
[[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.
[source,nix]
----
{
neovim-flake = {
url = github:notashelf/neovim-flake;
# you can override input nixpkgs
inputs.nixpkgs.follows = "nixpkgs";
};
}
----
Followed by importing the HM module.
[source,nix]
----
{
imports = [ neovim-flake.homeManagerModules.default ];
}
----
Then we should be able to use the given module. E.g.
[source,nix]
----
{
programs.neovim-flake = {
enable = true;
# your settings need to go into the settings attrset
settings = {
vim.viAlias = false;
vim.vimAlias = true;
vim.lsp = {
enable = true;
};
};
};
}
----
=== Custom vim/neovim plugins
It is possible to add custom plugins to your configuration by using the `vim.startPlugins` option and the this flake's lua DAG library.
Start by adding it to startPlugins. This example uses nvim-surround, but the process will be similar for other plugins as well.
[source,nix]
----
{
programs.neovim-flake = {
enable = true;
settings = {
vim.startPlugins = [ pkgs.vimPlugins.nvim-surround ];
};
};
}
----
Followed by requiring the plugin, should it need one, in the lua DAG. Please note that you're able to name the DAG to however you want, the name will add a `--SECTION <name>` in the init.vim, under which it will be initialized. `lib.nvim.dag.entryAfter ["name"]` could also be used to initialize a plugin only after a previous plugin has beeni initialize
Your final setup will likely look like this, where nvim-flake refers to your flake input or fetch.
[source,nix]
----
{
programs.neovim-flake = {
enable = true;
settings = {
vim.startPlugins = [ pkgs.vimPlugins.nvim-surround ];
luaConfigRC.nvim-surround = nvim-flake.lib.nvim.dag.entryAnywhere '' # nvim-flake is a reference to the flake. Please change this accordingly to your config.
require("nvim-surround").setup()
'';
};
};
}
----

View file

@ -55,3 +55,7 @@ https://github.com/notashelf[notashelf]:
* `vim.utility.colorizer` has been renamed to `vim.utility.ccc` after the plugin it uses
* Color preview via `nvim-colorizer.lua`
* Updated Lualine statusline UI
* Cleaned up documentation