1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00
oddlama_nix-config/users/myuser/dev/manpager.nix
2024-11-26 13:34:55 +01:00

74 lines
1.7 KiB
Nix

{
lib,
pkgs,
...
}:
{
home.sessionVariables.MANPAGER =
let
prg = lib.getExe (
pkgs.nixvim.makeNixvim {
package = pkgs.neovim-clean;
opts = {
buftype = "nowrite";
backup = false;
modeline = false;
shelltemp = false;
swapfile = false;
undofile = false;
writebackup = false;
virtualedit = "all";
splitkeep = "screen";
termguicolors = false;
ignorecase = true;
smartcase = true;
};
extraConfigLua = ''
vim.opt.shadafile = vim.fn.stdpath "state" .. "/shada/man.shada";
'';
keymaps = [
{
action = "<C-]>";
key = "<CR>";
mode = [ "n" ];
options = {
silent = true;
desc = "Jump to tag under cursor";
};
}
{
action = ":pop<CR>";
key = "<BS>";
mode = [ "n" ];
options = {
silent = true;
desc = "Jump to previous tag in stack";
};
}
{
action = ":pop<CR>";
key = "<C-Left>";
mode = [ "n" ];
options = {
silent = true;
desc = "Jump to previous tag in stack";
};
}
{
action = ":tag<CR>";
key = "<C-Right>";
mode = [ "n" ];
options = {
silent = true;
desc = "Jump to next tag in stack";
};
}
];
}
);
in
"${prg} '+Man!'";
}