mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-07 02:41:33 +00:00
docs: refactor
This commit is contained in:
parent
a35eab716a
commit
e360a1c16c
38 changed files with 829 additions and 789 deletions
23
docs/manual/custom-plugins/configuring.md
Normal file
23
docs/manual/custom-plugins/configuring.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Configuring {#configuring-plugins}
|
||||
|
||||
Just making the plugin to your neovim configuration available might not always be enough.
|
||||
In that case, you can write custom vimscript or lua config, using `config.vim.configRC` or `config.vim.luaConfigRC`
|
||||
respectively. These options are attribute sets, and you need to give the configuration you're adding some name, like this:
|
||||
|
||||
```nix
|
||||
{
|
||||
# this will create an "aquarium" section in your init.vim with the contents of your custom config
|
||||
# which will be *appended* to the rest of your configuration, inside your init.vim
|
||||
config.vim.configRC.aquarium = "colorscheme aquiarum";
|
||||
}
|
||||
```
|
||||
|
||||
:::{.note}
|
||||
If your configuration needs to be put in a specific place in the config, you can use functions from
|
||||
`inputs.neovim-flake.lib.nvim.dag` to order it.
|
||||
Refer to https://github.com/nix-community/home-manager/blob/master/modules/lib/dag.nix to find out more about
|
||||
the DAG system.
|
||||
:::
|
||||
|
||||
Also, if you successfully made your plugin work, please make a PR to add it to the flake, or open an issue
|
||||
with your findings so that we can make it available for everyone easily.
|
26
docs/manual/custom-plugins/new-method.md
Normal file
26
docs/manual/custom-plugins/new-method.md
Normal file
|
@ -0,0 +1,26 @@
|
|||
# New Method {#sec-new-method}
|
||||
|
||||
As of version 0.5, we have a more extensive API for configuring plugins, under `vim.extraPlugins`.
|
||||
|
||||
Instead of using DAGs exposed by the library, you may use the extra plugin module as follows:
|
||||
|
||||
```nix
|
||||
{
|
||||
config.vim.extraPlugins = with pkgs.vimPlugins; {
|
||||
aerial = {
|
||||
package = aerial-nvim;
|
||||
setup = ''
|
||||
require('aerial').setup {
|
||||
-- some lua configuration here
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
harpoon = {
|
||||
package = harpoon;
|
||||
setup = "require('harpoon').setup {}";
|
||||
after = ["aerial"];
|
||||
};
|
||||
};
|
||||
}
|
||||
```
|
18
docs/manual/custom-plugins/old-method.md
Normal file
18
docs/manual/custom-plugins/old-method.md
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Old Method {#sec-old-method}
|
||||
|
||||
Users who have not yet updated to 0.5, or prefer a more hands-on approach may use the old method where the load order
|
||||
of the plugins is determined by DAGs.
|
||||
|
||||
```nix
|
||||
{
|
||||
# fetch plugin source from GitHub and add it to startPlugins
|
||||
config.vim.startPlugins = [
|
||||
(pkgs.fetchFromGitHub {
|
||||
owner = "FrenzyExists";
|
||||
repo = "aquarium-vim";
|
||||
rev = "d09b1feda1148797aa5ff0dbca8d8e3256d028d5";
|
||||
sha256 = "CtyEhCcGxxok6xFQ09feWpdEBIYHH+GIFVOaNZx10Bs=";
|
||||
})
|
||||
];
|
||||
}
|
||||
```
|
Loading…
Add table
Add a link
Reference in a new issue