mirror of
https://github.com/nix-community/nixvim.git
synced 2025-07-14 03:04:34 +02:00
plugons/TEMPLATE: update to use mkNeovimPlugin
This commit is contained in:
parent
44949348cb
commit
f3e2fbace2
1 changed files with 10 additions and 24 deletions
|
@ -5,30 +5,16 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib; let
|
helpers.neovim-plugin.mkNeovimPlugin config {
|
||||||
cfg = config.plugins.my-plugin; # TODO replace
|
name = "my-plugin";
|
||||||
in {
|
originalName = "my-plugin.nvim";
|
||||||
meta.maintainers = [maintainers.MyName]; # TODO replace with your name
|
defaultPackage = pkgs.vimPlugins.my-plugin-nvim; # TODO replace
|
||||||
|
|
||||||
# TODO replace
|
# Optionnally provide an example for the `settings` option.
|
||||||
options.plugins.my-plugin =
|
settingsExample = {
|
||||||
helpers.neovim-plugin.extraOptionsOptions
|
foo = 42;
|
||||||
// {
|
bar.__raw = "function() print('hello') end";
|
||||||
enable = mkEnableOption "my-plugin.nvim"; # TODO replace
|
|
||||||
|
|
||||||
package = helpers.mkPackageOption "my-plugin.nvim" pkgs.vimPlugins.my-plugin-nvim; # TODO replace
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
extraPlugins = [cfg.package];
|
|
||||||
|
|
||||||
extraConfigLua = let
|
|
||||||
setupOptions = with cfg;
|
|
||||||
{
|
|
||||||
}
|
|
||||||
// cfg.extraOptions;
|
|
||||||
in ''
|
|
||||||
require('my-plugin').setup(${helpers.toLuaObject setupOptions})
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
maintainers = [lib.maintainers.MyName]; # TODO replace with your name
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue