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

zsh-syntax-highlighting: add -share script #84627

Closed
wants to merge 1 commit into from

Conversation

ch1bo
Copy link
Contributor

@ch1bo ch1bo commented Apr 7, 2020

Add a zsh-syntax-highlighting-share helper and update documentation
for [Interactive shell helpers]
(https://nixos.org/nixpkgs/manual/#sec-shell-helpers)

Motivation for this change

Use the zsh plugin zsh-synstax-highlighting from nixpkgs in dotfiles like documented (https://nixos.org/nixpkgs/manual/#sec-shell-helpers), i.e.

source "$(zsh-syntax-highlighting-share)/zsh-syntax-highlighting.zsh"

instead of something like

source "$(nix-build -Q '<nixpkgs>' -A zsh-syntax-highlighting)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Add a `zsh-syntax-highlighting-share` helper and update documentation
for [Interactive shell helpers]
(https://nixos.org/nixpkgs/manual/#sec-shell-helpers)
Copy link
Contributor

@ryneeverett ryneeverett left a comment

Choose a reason for hiding this comment

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

Are you familiar with the module which can be enabled with programs.zsh.syntaxHighlighting.enable = true;? If so, what is the advantage of this approach?

<para>
<literal>zsh-autoenv</literal>: <command>zsh-autoenv-share</command>
</para>
</listitem>
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you intend to include zsh-autoenv in this commit?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I saw that this was missing as well. It even seemed like fzf was one of the first like this and zsh-autoenv copied from this.

@ch1bo
Copy link
Contributor Author

ch1bo commented Apr 8, 2020

@ryneeverett I have seen programs.zsh.syntaxHighlighting.enable but am not on nixos (yet). Using such a script seemed like that is the nix/nixpgs way on non-nixos to access the derivations share directory. See also my "motivation for this change".

@ch1bo
Copy link
Contributor Author

ch1bo commented Jun 18, 2020

Anything I can do to get this merged?

@stale
Copy link

stale bot commented Dec 15, 2020

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 15, 2020
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jan 18, 2021
@stale
Copy link

stale bot commented Jul 19, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jul 19, 2021
@ch1bo
Copy link
Contributor Author

ch1bo commented Jul 20, 2021

Closing this as it seems to have been forgotten and I don't use it anymore myself.

@ch1bo ch1bo closed this Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants