diff options
| author | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-08-11 00:12:24 +0530 |
|---|---|---|
| committer | Arpit Chakladar <arpitchakladar+git@gmail.com> | 2026-08-29 03:50:19 +0530 |
| commit | 3e5c85e31ade2101a432be7ee4183c77417d156c (patch) | |
| tree | f5d8efc061a7875e6267242a027c2825861ae3e2 /modules/communication/neomutt/neomutt.nix | |
| parent | 88d8ddb9e64ca3663c6fbff05727994d93529a0d (diff) | |
| download | home-manager-config-3e5c85e31ade2101a432be7ee4183c77417d156c.tar.gz home-manager-config-3e5c85e31ade2101a432be7ee4183c77417d156c.zip | |
feat: Using neovim for pager in neomutt, neomutt keybindings
- Using neovim as a pager for neomutt to make it easier to read emails
- Using universal :q for back/exit instead of q
Diffstat (limited to 'modules/communication/neomutt/neomutt.nix')
| -rw-r--r-- | modules/communication/neomutt/neomutt.nix | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/modules/communication/neomutt/neomutt.nix b/modules/communication/neomutt/neomutt.nix index e25d0b3..7008433 100644 --- a/modules/communication/neomutt/neomutt.nix +++ b/modules/communication/neomutt/neomutt.nix @@ -38,7 +38,7 @@ nativeBuildInputs = [ pkgs.makeWrapper ]; postBuild = '' wrapProgram $out/bin/neomutt \ - --prefix PATH : ${lib.makeBinPath [ pkgs.urlscan ]} + --prefix PATH : ${config.home.profileDirectory}/bin:${lib.makeBinPath [ pkgs.urlscan ]} ''; meta.mainProgram = "neomutt"; }; @@ -47,7 +47,16 @@ vimKeys = false; unmailboxes = true; checkStatsInterval = 20; - extraConfig = builtins.readFile ./.neomuttrc; + extraConfig = '' + # Read messages in Neovim. `-` makes Neovim read the message from + # stdin and -R prevents accidental edits to message content. + set pager = "nvim -R -n +'setlocal nolist | silent! 1,2g/^$/delete _ | nohlsearch | setlocal nomodified nomodifiable' -" + # Return directly to the index when Neovim exits and do not prepend + # NeoMutt’s pager status line to the message passed to Neovim. + set noprompt_after + set pager_format = "" + '' + + builtins.readFile ./.neomuttrc; }; }; } |
