Skip to content

Commit

Permalink
Merge pull request #937 from pcboy/add-delta-support
Browse files Browse the repository at this point in the history
Add Delta support (a syntax-highlighting pager for git)
  • Loading branch information
domenkozar authored Jan 16, 2024
2 parents 75dfa5e + df1d649 commit b29eeae
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
9 changes: 9 additions & 0 deletions docs/integrations/delta.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
To get started using [Delta, a syntax-highlighting pager for git, diff, and grep output](https://dandavison.github.io/delta/), flip a toggle:

```nix title="devenv.nix"
{ pkgs, ... }:
{
delta.enable = true;
}
```
2 changes: 1 addition & 1 deletion docs/integrations/difftastic.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
To get started using [Difftastic, a structural diff that understands syntax for over 30 langauges](https://difftastic.wilfred.me.uk/), flip a toggle:
To get started using [Difftastic, a structural diff that understands syntax for over 30 languages](https://difftastic.wilfred.me.uk/), flip a toggle:


```nix title="devenv.nix"
Expand Down
15 changes: 15 additions & 0 deletions src/modules/integrations/delta.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{ pkgs, lib, config, ... }:

{
options.delta.enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Integrate delta into git: https://dandavison.github.io/delta/.";
};

config = lib.mkIf config.delta.enable {
packages = [ pkgs.delta ];

env.GIT_PAGER = "delta";
};
}

0 comments on commit b29eeae

Please sign in to comment.