Skip to content

Commit

Permalink
lib/helpers: init neovim-plugin.mkSetupOptionsOption
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Jan 28, 2024
1 parent e2c3459 commit 43f3cb7
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/neovim-plugin.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,27 @@
nixvimOptions,
}:
with lib; {
mkSetupOptionsOption = pluginName: options: {
type = with types;
submodule {
freeformType = with types; attrsOf anything;
inherit options;
};
description = ''
Options provided to the `require('${pluginName}').setup` function.
'';
default = {};
example = {
foo_bar = 42;
hostname = "localhost:8080";
callback.__raw = ''
function()
print('nixvim')
end
'';
};
};

extraOptionsOptions = {
extraOptions = mkOption {
default = {};
Expand Down

0 comments on commit 43f3cb7

Please sign in to comment.