2024-01-26 08:47:30 +00:00
|
|
|
{ config, lib, pkgs, helpers, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
cfg = config.plugins.firenvim;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.plugins.firenvim = {
|
|
|
|
enable = lib.mkEnableOption "Firenvim";
|
|
|
|
package = helpers.mkPackageOption "firenvim" pkgs.vimPlugins.firenvim;
|
2024-02-14 10:55:21 +00:00
|
|
|
settings = helpers.mkSettingsOption {
|
|
|
|
description = ''
|
|
|
|
Extra configuration options for Firenvim.
|
|
|
|
'';
|
2024-01-26 08:47:30 +00:00
|
|
|
example = {
|
|
|
|
globalSettings = { alt = "all"; };
|
|
|
|
localSettings = {
|
|
|
|
"\".*\"" = {
|
|
|
|
cmdline = "nvim";
|
|
|
|
content = "text";
|
|
|
|
priority = 0;
|
|
|
|
selector = "textarea";
|
|
|
|
takeover = "always";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
extraPlugins = [ cfg.package ];
|
|
|
|
|
2024-02-14 10:55:21 +00:00
|
|
|
globals.firenvim_config = cfg.settings;
|
2024-01-26 08:47:30 +00:00
|
|
|
};
|
|
|
|
}
|