nixvim/plugins/firenvim: update to RFC42-style settings

This commit is contained in:
Gabriel Arazas 2024-02-14 18:55:21 +08:00
parent 0c1850d8b0
commit 434a4e90aa
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -7,9 +7,10 @@ in
options.plugins.firenvim = { options.plugins.firenvim = {
enable = lib.mkEnableOption "Firenvim"; enable = lib.mkEnableOption "Firenvim";
package = helpers.mkPackageOption "firenvim" pkgs.vimPlugins.firenvim; package = helpers.mkPackageOption "firenvim" pkgs.vimPlugins.firenvim;
extraConfig = lib.mkOption { settings = helpers.mkSettingsOption {
type = with lib.types; attrsOf anything; description = ''
default = { }; Extra configuration options for Firenvim.
'';
example = { example = {
globalSettings = { alt = "all"; }; globalSettings = { alt = "all"; };
localSettings = { localSettings = {
@ -22,15 +23,12 @@ in
}; };
}; };
}; };
description = ''
Extra configuration options for Firenvim.
'';
}; };
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
extraPlugins = [ cfg.package ]; extraPlugins = [ cfg.package ];
globals.firenvim_config = cfg.extraConfig; globals.firenvim_config = cfg.settings;
}; };
} }