feat: nvim man pager

This commit is contained in:
Patrick 2023-09-19 00:43:49 +02:00
parent 11764d5850
commit 6e4a4ea353
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F
3 changed files with 27 additions and 2 deletions

View file

@ -2,6 +2,7 @@
imports = [
./shells/alias.nix
./shells/zsh
./shells/pager.nix
./programs/gpg
];

View file

@ -32,8 +32,8 @@
};
};
brightness = 99; # brighness value between 0 and 99
display_timeout = 1800; # dimmer timeout in seconds
brightness_dimmed = 10; # dimmed brighness
display_timeout = 0; # dimmer timeout in seconds
brightness_dimmed = 99; # dimmed brighness
};
};
};

View file

@ -0,0 +1,24 @@
{pkgs, ...}: let
initLua = pkgs.writeText "init.lua" ''
vim.opt.buftype = "nowrite"
vim.opt.history=0
vim.opt.backup=false
vim.opt.modeline=false
vim.opt.shelltemp=false
vim.opt.swapfile=false
vim.opt.undofile=false
vim.opt.writebackup = false
vim.opt.shada-file = vim.fn.stdpath "state" .. "/shada/man.shada"
'';
nvimPager = pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped neovimConfig;
neovimConfig =
pkgs.neovimUtils.makeNeovimConfig {
wrapRc = false;
withPython3 = false;
}
// {
wrapperArgs = ["--add-flags" "--clean -u ${initLua}"];
};
in {
home.sessionVariables.MANPAGER = "${nvimPager}/bin/nvim '+Man!'";
}