mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-01 19:11:15 +00:00
docs: cleanup
This commit is contained in:
parent
e719eb1176
commit
aaf57d02e7
2 changed files with 2 additions and 80 deletions
|
@ -18,11 +18,10 @@ Please delete any options that are not relevant.
|
||||||
|
|
||||||
## Checklist
|
## Checklist
|
||||||
|
|
||||||
Please try to check at least a majority of the checklist before opening your pull request. PRs
|
Please try to check at least a majority of the checklist before opening your pull request. Exceptions to this will be reviewed on a case by case basis.
|
||||||
Exceptions to this will be reviewed on a case by case basis.
|
|
||||||
|
|
||||||
- [ ] My code follows the style and contributing guidelines of this project.
|
- [ ] My code follows the style and contributing guidelines of this project.
|
||||||
- [ ] I ran Alejandra to format my code.
|
- [ ] I ran Alejandra to format my code (`nix fmt`).
|
||||||
- [ ] I have performed a self-review of my own code and tested it.
|
- [ ] I have performed a self-review of my own code and tested it.
|
||||||
- [ ] I have commented my code, particularly in hard-to-understand areas.
|
- [ ] I have commented my code, particularly in hard-to-understand areas.
|
||||||
- [ ] My changes generate no new warnings.
|
- [ ] My changes generate no new warnings.
|
||||||
|
|
|
@ -1,77 +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;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
=== Custom vim plugins
|
|
||||||
|
|
||||||
It's possible to add custom vim plugins by using the startPlugins and lua DAG settings. First we install the plugin 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 ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
----
|
|
||||||
|
|
||||||
Then we continue by requiring the plugin in lua using DAG settings. Please note that you're able to name this setting to however you want, the name will add a `--SECTION <name>` in the init.vim, under which it will be initialized.
|
|
||||||
|
|
||||||
[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()
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
----
|
|
Loading…
Reference in a new issue