2023-02-20 11:42:13 +01:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
} @ attrs:
|
|
|
|
with lib; let
|
|
|
|
helpers = import ../helpers.nix {inherit lib;};
|
2022-01-21 19:22:03 -04:00
|
|
|
|
|
|
|
eitherAttrsStrInt = with types; let
|
|
|
|
strInt = either str int;
|
2023-02-20 11:42:13 +01:00
|
|
|
in
|
|
|
|
either strInt (attrsOf (either strInt (attrsOf strInt)));
|
|
|
|
in
|
|
|
|
with helpers;
|
|
|
|
mkPlugin attrs {
|
|
|
|
name = "emmet";
|
|
|
|
description = "Enable emmet";
|
|
|
|
package = pkgs.vimPlugins.emmet-vim;
|
2023-03-24 08:18:45 +01:00
|
|
|
globalPrefix = "user_emmet_";
|
2022-01-21 19:22:03 -04:00
|
|
|
|
2023-02-20 11:42:13 +01:00
|
|
|
options = {
|
|
|
|
mode = mkDefaultOpt {
|
|
|
|
type = types.enum ["i" "n" "v" "a"];
|
2023-03-24 08:18:45 +01:00
|
|
|
global = "mode";
|
2023-02-20 11:42:13 +01:00
|
|
|
description = "Mode where emmet will enable";
|
|
|
|
};
|
2022-01-21 19:22:03 -04:00
|
|
|
|
2023-02-20 11:42:13 +01:00
|
|
|
leader = mkDefaultOpt {
|
|
|
|
type = types.str;
|
2023-03-24 08:18:45 +01:00
|
|
|
global = "leader_key";
|
2023-02-20 11:42:13 +01:00
|
|
|
description = "Set leader key";
|
|
|
|
};
|
2022-01-21 19:22:03 -04:00
|
|
|
|
2023-02-20 11:42:13 +01:00
|
|
|
settings = mkDefaultOpt {
|
|
|
|
type = types.attrsOf (types.attrsOf eitherAttrsStrInt);
|
2023-03-24 08:18:45 +01:00
|
|
|
global = "settings";
|
2023-02-20 11:42:13 +01:00
|
|
|
description = "Emmet settings";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|