From 8908e8bee0347c59231f6c0c69afcf7ef926c2f6 Mon Sep 17 00:00:00 2001 From: Matthieu Morin Date: Sun, 9 Jun 2024 17:12:16 +0000 Subject: [PATCH] Add home/laozi/common/core/bat.nix --- home/laozi/common/core/bat.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 home/laozi/common/core/bat.nix diff --git a/home/laozi/common/core/bat.nix b/home/laozi/common/core/bat.nix new file mode 100644 index 0000000..0aa0bec --- /dev/null +++ b/home/laozi/common/core/bat.nix @@ -0,0 +1,20 @@ +# https://github.com/sharkdp/bat +# https://github.com/eth-p/bat-extras + +{ pkgs, ... }: { + programs.bat = { + enable = true; + config = { + # Show line numbers, Git modifications and file header (but no grid) + style = "numbers,changes,header"; + theme = "gruvbox-dark"; + }; + extraPackages = builtins.attrValues { + inherit (pkgs.bat-extras) + + batgrep# search through and highlight files using ripgrep + batdiff# Diff a file against the current git index, or display the diff between to files + batman; # read manpages using bat as the formatter + }; + }; +} \ No newline at end of file