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 option to enable zsh-syntax-highlighting #1321

Closed
davegallant opened this issue Jun 10, 2020 · 3 comments
Closed

Add option to enable zsh-syntax-highlighting #1321

davegallant opened this issue Jun 10, 2020 · 3 comments

Comments

@davegallant
Copy link
Contributor

davegallant commented Jun 10, 2020

Issue description

Exposing a enableSyntaxHighlighting to enable zsh-syntax-highlighting would be convenient.

This is something that is in nixos/modules/program/zsh.

Meta

Maintainer CC

@uvNikita
@rycee

Technical details

I am new to nix, but was able to workaround this by the following:

programs.zsh = {
  enable = true;

  localVariables = {
    ZSH_DISABLE_COMPFIX = "true";
  };

  initExtra = ''
    source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  '';

  plugins = [
    {
      name = "syntax-highlighting";
      src = "${pkgs.zsh-syntax-highlighting}/share/zsh/site-functions";
    }
  ];
};
@ShrykeWindgrace
Copy link

Relevant recent issue: #1251 . It has a similar workaround for nixpkgs.zsh-fast-syntax-highlighting, but without extra steps in initExtra

@davegallant
Copy link
Contributor Author

Relevant recent issue: #1251 . It has a similar workaround for nixpkgs.zsh-fast-syntax-highlighting, but without extra steps in initExtra

Was unaware of this other highlighter. Works well also :)

@stale
Copy link

stale bot commented Apr 29, 2021

Thank you for your contribution! I marked this issue as stale due to inactivity. If this remains inactive for another 7 days, I will close this issue. Please read the relevant sections below before commenting.

If you are the original author of the issue

  • If this is resolved, please consider closing it so that the maintainers know not to focus on this.
  • If this might still be an issue, but you are not interested in promoting its resolution, please consider closing it while encouraging others to take over and reopen an issue if they care enough.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

If you are not the original author of the issue

  • If you are also experiencing this issue, please add details of your situation to help with the debugging process.
  • If you know how to solve the issue, please consider submitting a Pull Request that addresses this issue.

Memorandum on closing issues

If you have nothing of substance to add, please refrain from commenting and allow the bot close the issue. Also, don't be afraid to manually close an issue, even if it holds valuable information.

Closed issues stay in the system for people to search, read, cross-reference, or even reopen--nothing is lost! Closing obsolete issues is an important way to help maintainers focus their time and effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants