Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more configuration options for zsh-syntax-highlighting #25153

Merged
merged 3 commits into from Apr 23, 2017
Merged

Add more configuration options for zsh-syntax-highlighting #25153

merged 3 commits into from Apr 23, 2017

Conversation

Ma27
Copy link
Member

@Ma27 Ma27 commented Apr 23, 2017

⚠️ BC Break: I moved the entire zsh-syntax-highlighting stuff out into its own module which breaks compatibility with older distro versions.

Motivation for this change

(similar to #25140)

I'd like to have a fully declarative configuration for my ZSH which consists of nix expressions.
Right now it's already possible to enable zsh-syntax-highlighting globally using programs.zsh, but it's not possible to set the highlighters option using nix expressions which is used to configuration which highlighters should be used by zsh-syntax-highlighting.

I tested it in a test VM using the following configuration:

{
  # ...
  programs.zsh = {
    enable = true;

    syntax-highlighting = {
      enable = true;
      highlighters = ["main" "brackets"];
    };
  };
}

I created the VM using the following command:

NIXOS_CONFIG=`pwd`/vmtest.nix nixos-rebuild -I nixpkgs=$HOME/Projects/nixpkgs/ build-vm
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@Ma27, thanks for your PR! By analyzing the history of the files in this pull request, we identified @edolstra, @bjornfor and @offlinehacker to be potential reviewers.

@@ -84,22 +84,13 @@ in
type = types.bool;
};

enableSyntaxHighlighting = mkOption {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add this deprecation in ./nixos/modules/rename.nix

@Ma27
Copy link
Member Author

Ma27 commented Apr 23, 2017

@Mic92 done

@Mic92 Mic92 merged commit 0a12aaf into NixOS:master Apr 23, 2017
@Ma27 Ma27 deleted the zsh/syntax-highlighting-config branch April 23, 2017 19:24
peti pushed a commit that referenced this pull request Jun 12, 2017
…odule (#25153)

* programs.zsh: factor zsh-syntax-highlighting out into its own module

* programs.zsh.syntax-highlighting: add `highlighters` option

* programs.zsh: document BC break introduced by moving zsh-syntax-completion into its own module

(cherry picked from commit 0a12aaf)
ambrop72 pushed a commit to ambrop72/nixpkgs that referenced this pull request Jun 21, 2017
…odule (NixOS#25153)

* programs.zsh: factor zsh-syntax-highlighting out into its own module

* programs.zsh.syntax-highlighting: add `highlighters` option

* programs.zsh: document BC break introduced by moving zsh-syntax-completion into its own module

(cherry picked from commit 0a12aaf)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants