From 7c039f8398f8250eb302aa1d20680dc2bef53635 Mon Sep 17 00:00:00 2001 From: punkfairie Date: Sun, 3 Nov 2024 19:05:12 -0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(lazygit):=20Add=20lzg=20shortc?= =?UTF-8?q?ut?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- home/programs/lazygit.nix | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/home/programs/lazygit.nix b/home/programs/lazygit.nix index 56d70a0..39a9b6d 100644 --- a/home/programs/lazygit.nix +++ b/home/programs/lazygit.nix @@ -1,4 +1,7 @@ -{ ... }: +{ config, lib, ... }: +let + has-delta = config.programs.git.delta.enable; +in { programs.lazygit = { enable = true; @@ -8,11 +11,14 @@ git.paging = { colorArg = "always"; - # TODO: only set this if delta is installed - pager = "delta --paging=never --features=arctic-fox"; + pager = lib.mkIf has-delta "delta --paging=never --features=arctic-fox"; }; os.editPreset = "nvim-remote"; }; }; + + home.shellAbbrs = { + lzg = "lazygit"; + }; }