forked from mirrors_public/oddlama_nix-config
feat: remove manpager replacement for normal machines to improve evaluation speed
This commit is contained in:
parent
94ea46f680
commit
303fbd5595
5 changed files with 4 additions and 4 deletions
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./direnv.nix
|
||||
./gdb.nix
|
||||
./manpager.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
|
|
67
users/myuser/dev/manpager.nix
Normal file
67
users/myuser/dev/manpager.nix
Normal file
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
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;
|
||||
};
|
||||
|
||||
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!'";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue