nix-community.nixvim/plugins/utils/emmet.nix
Gabriel Arazas 6b0f03e4a1 plugins: clean up module descriptions
Only for the `enable` option though.
2024-01-26 15:43:47 +01:00

39 lines
925 B
Nix

{
lib,
pkgs,
...
} @ attrs:
with lib; let
helpers = import ../helpers.nix {inherit lib;};
eitherAttrsStrInt = with types; let
strInt = either str int;
in
either strInt (attrsOf (either strInt (attrsOf strInt)));
in
with helpers.vim-plugin;
mkVimPlugin attrs {
name = "emmet";
package = pkgs.vimPlugins.emmet-vim;
globalPrefix = "user_emmet_";
options = {
mode = mkDefaultOpt {
type = types.enum ["i" "n" "v" "a"];
global = "mode";
description = "Mode where emmet will enable";
};
leader = mkDefaultOpt {
type = types.str;
global = "leader_key";
description = "Set leader key";
};
settings = mkDefaultOpt {
type = types.attrsOf (types.attrsOf eitherAttrsStrInt);
global = "settings";
description = "Emmet settings";
};
};
}