mirror of
https://github.com/nix-community/nixvim.git
synced 2025-11-17 16:02:48 +01:00
plugins/neogit: remove (most) explicit option declarations from settingsOptions
We need to keep the options that actively transform user inputs :/
This commit is contained in:
parent
c6b45bb66e
commit
283775355b
2 changed files with 22 additions and 436 deletions
|
|
@ -31,8 +31,6 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
}
|
||||
];
|
||||
|
||||
settingsOptions = import ./settings-options.nix { inherit lib helpers; };
|
||||
|
||||
settingsExample = {
|
||||
kind = "floating";
|
||||
commit_popup.kind = "floating";
|
||||
|
|
@ -58,13 +56,34 @@ lib.nixvim.plugins.mkNeovimPlugin {
|
|||
};
|
||||
};
|
||||
|
||||
settingsOptions = {
|
||||
telescope_sorter = lib.nixvim.mkNullOrLuaFn ''
|
||||
Allows a different telescope sorter.
|
||||
Defaults to 'fuzzy_with_index_bias'.
|
||||
The example below will use the native fzf sorter instead.
|
||||
By default, this function returns `nil`.
|
||||
|
||||
Example:
|
||||
```lua
|
||||
require("telescope").extensions.fzf.native_fzf_sorter
|
||||
```
|
||||
'';
|
||||
|
||||
commit_view.verify_commit = lib.nixvim.mkNullOrStrLuaOr lib.types.bool ''
|
||||
Show commit signature information in the buffer.
|
||||
Can be set to true or false, otherwise we try to find the binary.
|
||||
|
||||
Default: "os.execute('which gpg') == 0"
|
||||
'';
|
||||
};
|
||||
|
||||
extraConfig = cfg: {
|
||||
assertions = lib.nixvim.mkAssertions "plugins.neogit" (
|
||||
map
|
||||
(name: {
|
||||
assertion =
|
||||
let
|
||||
extensionEnabled = cfg.settings.integrations.${name} == true;
|
||||
extensionEnabled = (cfg.settings.integrations.${name} or false) == true;
|
||||
pluginEnabled = config.plugins.${name}.enable;
|
||||
in
|
||||
extensionEnabled -> pluginEnabled;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue