feat: nvim man pager
This commit is contained in:
parent
11764d5850
commit
6e4a4ea353
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./shells/alias.nix
|
||||
./shells/zsh
|
||||
./shells/pager.nix
|
||||
|
||||
./programs/gpg
|
||||
];
|
||||
|
|
|
@ -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
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
24
users/common/shells/pager.nix
Normal file
24
users/common/shells/pager.nix
Normal 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!'";
|
||||
}
|
Loading…
Reference in a new issue