2024-12-18 21:05:05 +00:00
|
|
|
{
|
|
|
|
call,
|
|
|
|
lib,
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
inherit (lib.nixvim.plugins.vim)
|
|
|
|
mkSettingsOptionDescription
|
|
|
|
;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
mkVimPlugin = call ./mk-vim-plugin.nix { };
|
|
|
|
|
2024-12-17 18:13:02 +01:00
|
|
|
mkSettingsOptionDescription =
|
|
|
|
{ name, globalPrefix }:
|
|
|
|
''
|
|
|
|
The configuration options for **${name}** without the `${globalPrefix}` prefix.
|
|
|
|
|
|
|
|
For example, the following settings are equivialent to these `:setglobal` commands:
|
|
|
|
- `foo_bar = 1` -> `:setglobal ${globalPrefix}foo_bar=1`
|
|
|
|
- `hello = "world"` -> `:setglobal ${globalPrefix}hello="world"`
|
|
|
|
- `some_toggle = true` -> `:setglobal ${globalPrefix}some_toggle`
|
|
|
|
- `other_toggle = false` -> `:setglobal no${globalPrefix}other_toggle`
|
|
|
|
'';
|
|
|
|
|
|
|
|
mkSettingsOption =
|
|
|
|
{
|
|
|
|
options ? { },
|
|
|
|
example ? { },
|
|
|
|
name,
|
|
|
|
globalPrefix,
|
|
|
|
}:
|
|
|
|
lib.nixvim.mkSettingsOption {
|
|
|
|
inherit options example;
|
|
|
|
description = mkSettingsOptionDescription { inherit name globalPrefix; };
|
|
|
|
};
|
2024-01-24 22:49:29 +01:00
|
|
|
}
|