mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-19 08:39:50 +01:00
chore: add custom plugins documentation
This commit is contained in:
parent
c8ea2f0f8e
commit
6afd466b0f
2 changed files with 35 additions and 0 deletions
34
docs/custom-plugins.adoc
Normal file
34
docs/custom-plugins.adoc
Normal file
|
@ -0,0 +1,34 @@
|
|||
[[ch-custom-plugins]]
|
||||
== Custom Plugins
|
||||
|
||||
You can use custom plugins, before they are implemented in the flake.
|
||||
To add a plugin, you need to add it to your config's `config.vim.startPlugins` array.
|
||||
This is an example of adding the FrenzyExists/aquarium-vim plugin:
|
||||
|
||||
[source,nix]
|
||||
----
|
||||
{
|
||||
config.vim.startPlugins = [
|
||||
(pkgs.fetchFromGitHub {
|
||||
owner = "FrenzyExists";
|
||||
repo = "aquarium-vim";
|
||||
rev = "d09b1feda1148797aa5ff0dbca8d8e3256d028d5";
|
||||
sha256 = "CtyEhCcGxxok6xFQ09feWpdEBIYHH+GIFVOaNZx10Bs=";
|
||||
})
|
||||
];
|
||||
}
|
||||
----
|
||||
|
||||
However, just making the plugin available might not 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:
|
||||
|
||||
[source,nix]
|
||||
----
|
||||
{
|
||||
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.
|
||||
|
||||
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.
|
|
@ -19,6 +19,7 @@
|
|||
<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"/>
|
||||
<appendix xml:id="ch-options">
|
||||
|
|
Loading…
Reference in a new issue