mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
Instead of maintainers providing an actual `defaultPackage`, they should specify the pkg name which we'll use when calling `lib.mkPackageOption`. This makes `mkVimPlugin` and `mkNeovimPlugin` compliant with #1950.
28 lines
780 B
Nix
28 lines
780 B
Nix
{ lib, ... }:
|
|
let
|
|
inherit (lib.nixvim) defaultNullOpts;
|
|
in
|
|
lib.nixvim.neovim-plugin.mkNeovimPlugin {
|
|
name = "my-plugin";
|
|
originalName = "my-plugin.nvim"; # TODO replace (or remove entirely if it is the same as `name`)
|
|
package = "my-plugin-nvim"; # TODO replace
|
|
|
|
maintainers = [ lib.maintainers.MyName ]; # TODO replace with your name
|
|
|
|
# Optionally, explicitly declare some options. You don't have to.
|
|
settingsOptions = {
|
|
foo = defaultNullOpts.mkUnsignedInt 97 ''
|
|
The best birth year.
|
|
'';
|
|
|
|
great_feature = defaultNullOpts.mkBool false ''
|
|
Whether to enable the great feature.
|
|
'';
|
|
};
|
|
|
|
# Optionally, provide an example for the `settings` option.
|
|
settingsExample = {
|
|
foo = 42;
|
|
bar.__raw = "function() print('hello') end";
|
|
};
|
|
}
|