mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-25 10:18:36 +02:00
lib/helpers: init neovim-plugin.mkSetupOptionsOption
This commit is contained in:
parent
e2c3459d1d
commit
43f3cb7ab2
1 changed files with 21 additions and 0 deletions
|
@ -3,6 +3,27 @@
|
||||||
nixvimOptions,
|
nixvimOptions,
|
||||||
}:
|
}:
|
||||||
with lib; {
|
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 = {
|
extraOptionsOptions = {
|
||||||
extraOptions = mkOption {
|
extraOptions = mkOption {
|
||||||
default = {};
|
default = {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue