diff options
author | Maximilian Bosch <maximilian@mbosch.me> | 2017-04-25 16:00:20 +0200 |
---|---|---|
committer | Maximilian Bosch <maximilian@mbosch.me> | 2017-04-25 16:00:26 +0200 |
commit | baa3b3effff51d9aea43ee524329f8bbcbdaf3ec (patch) | |
tree | 11a71b53187f417a099b92db4bc8400fc1b449ff /nixos/modules/programs/zsh/zsh-syntax-highlighting.nix | |
parent | 9046e54f6da793f19874b7ffe2cf767539702f56 (diff) | |
download | nixlib-baa3b3effff51d9aea43ee524329f8bbcbdaf3ec.tar nixlib-baa3b3effff51d9aea43ee524329f8bbcbdaf3ec.tar.gz nixlib-baa3b3effff51d9aea43ee524329f8bbcbdaf3ec.tar.bz2 nixlib-baa3b3effff51d9aea43ee524329f8bbcbdaf3ec.tar.lz nixlib-baa3b3effff51d9aea43ee524329f8bbcbdaf3ec.tar.xz nixlib-baa3b3effff51d9aea43ee524329f8bbcbdaf3ec.tar.zst nixlib-baa3b3effff51d9aea43ee524329f8bbcbdaf3ec.zip |
programs.zsh.syntax-highlighting: refactor `highlighters` option for proper validation
Right now the `programs.zsh.syntax-highlighting.highlighters` option lacks appropriate validation which can cause confusing things when mistyping a higlighter for zsh-syntax-highlighting.
Diffstat (limited to 'nixos/modules/programs/zsh/zsh-syntax-highlighting.nix')
-rw-r--r-- | nixos/modules/programs/zsh/zsh-syntax-highlighting.nix | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix index 962c1f920a86..fde241ca3ce3 100644 --- a/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix +++ b/nixos/modules/programs/zsh/zsh-syntax-highlighting.nix @@ -18,7 +18,17 @@ in highlighters = mkOption { default = [ "main" ]; - type = types.listOf(types.str); + + # https://github.com/zsh-users/zsh-syntax-highlighting/blob/master/docs/highlighters.md + type = types.listOf(types.enum([ + "main" + "brackets" + "pattern" + "cursor" + "root" + "line" + ])); + description = '' Specifies the highlighters to be used by zsh-syntax-highlighting. |