mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-11-09 14:45:58 +01:00
updated docs to add a section for custom vim plugins.
This commit is contained in:
parent
1678ef4738
commit
a935c15e0a
1 changed files with 33 additions and 0 deletions
|
@ -42,3 +42,36 @@ Then we should be able to use the given module. E.g.
|
|||
};
|
||||
}
|
||||
----
|
||||
|
||||
=== 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, I'll be using the nvim-surround plugin for example. This process should be very similar for nixos installations.
|
||||
|
||||
[source,nix]
|
||||
----
|
||||
{
|
||||
programs.neovim-flake = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim.startPlugins = [ pkgs.vimPlugins.nvim-surround ];
|
||||
};
|
||||
};
|
||||
}
|
||||
----
|
||||
|
||||
Then we continue by requireing the plugin in lua using DAG settings. Please note that you're able to name this setting to however you want, in my situation I'll name it nvim-surround since that's the plugin that I'll be installing.
|
||||
|
||||
[source,nix]
|
||||
----
|
||||
{
|
||||
programs.neovim-flake = {
|
||||
enable = true;
|
||||
settings = {
|
||||
vim.startPlugins = [ pkgs.vimPlugins.nvim-surround ];
|
||||
luaConfigRC.nvim-surround = nvim-flake.lib.nvim.dag.entryAnywhere ''
|
||||
require("nvim-surround").setup()
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
----
|
Loading…
Reference in a new issue