feat: add nvim-pager package

This commit is contained in:
2025-02-01 01:11:40 +00:00
parent a13025868a
commit 90a0437755
2 changed files with 19 additions and 13 deletions

14
package/nvim-pager.nix Normal file
View File

@@ -0,0 +1,14 @@
{ pkgs, ... }:
pkgs.writeShellScriptBin "pager" ''
nvim -R --clean -c 'set buftype=nofile' -c 'nnoremap q :q!<CR>' -c 'set nowrap' \
-c 'set runtimepath^=${pkgs.vimPlugins.vim-plugin-AnsiEsc}' \
-c 'runtime! plugin/*.vim' -c 'AnsiEsc' -
# ^^^^^^^^^^^^^^^^^^^^
# Prevents Neovim from treating the buffer as a file
# ^^^^^^^^^^^^^^^^^^^^
# Makes 'q' quit Neovim immediately
# ^^^^^^^^^^^
# Disables text wrapping
# ^^^^^^^^
# Enables ANSI color interpretation
''