fix: add missing !Man command in new neovim manpager

This commit is contained in:
oddlama 2023-11-16 16:58:09 +01:00
parent 749e7b49a8
commit f6da5b0d68
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A

View file

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