feat: add separate neovim config for manpager use

This commit is contained in:
oddlama 2023-09-19 03:48:29 +02:00
parent ccba5306de
commit ea63eea40b
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
6 changed files with 31 additions and 2 deletions

View file

@ -1,9 +1,10 @@
{...}: {
{pkgs, ...}: {
imports = [
./documentation.nix
./yubikey.nix
];
environment.systemPackages = [pkgs.man-pages pkgs.man-pages-posix];
environment.enableDebugInfo = true;
services.nixseparatedebuginfod.enable = true;
}

View file

@ -0,0 +1,14 @@
{pkgs, ...}: let
nvimPager = pkgs.wrapNeovimUnstable pkgs.neovim-unwrapped nvimConfig;
nvimConfig =
pkgs.neovimUtils.makeNeovimConfig {
wrapRc = false;
withPython3 = false;
withRuby = false;
}
// {
wrapperArgs = ["--add-flags" "--clean -u ${./init.lua}"];
};
in {
home.sessionVariables.MANPAGER = "${nvimPager}/bin/nvim '+Man!'";
}

View file

@ -0,0 +1,11 @@
vim.opt.buftype = "nowrite"
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.shadafile = vim.fn.stdpath "state" .. "/shada/man.shada"
-- Make sure to use ANSI colors
vim.opt.termguicolors = false

View file

@ -5,6 +5,7 @@
./config/htop.nix
./config/impermanence.nix
./config/manpager
./config/neovim.nix
./config/shell
./config/utils.nix

View file

@ -5,7 +5,7 @@
];
home = {
extraOutputsToInstall = ["doc" "devdoc"];
extraOutputsToInstall = ["man" "doc" "devdoc"];
packages = with pkgs; [
git-lfs
d2

View file

@ -37,6 +37,8 @@
zathura
];
# TODO neovim directtly opening file has different syntax
# TODO neovim reopening file should continue at the previous position
# TODO thunderbird doesn't use passwords from password command
# TODO rotating wallpaper
# TODO thunderbird date time format is wrong even though this is C.utf8