samhh / dotfiles

Configuring the universe with Nix.
51 stars 2 forks source link

nvim Lua modules not found - manpager, git, pass, etc #346

Closed samhh closed 2 years ago

samhh commented 2 years ago

Since https://github.com/samhh/dotfiles/commit/99b7512574cab36f3a2aef6cf5173720711cc6fb.

2022-08-18T22:54:58,667750975+01:00

etc

Only with man foo with MANPAGER set. Not with nvim +Man! directly.

samhh commented 2 years ago

Happens when hitting e in git add -p as well.

samhh commented 2 years ago

I think it's a discrepancy between my Home Manager nvim and editorBin.

realpath $(which nvim) and the path in $EDITOR and $MANPAGER don't align.

Reading those (they're shell scripts) there's a path provided at the end via --cmd, which I think was recently introduced with: https://github.com/NixOS/nixpkgs/pull/184364

The former has all my plugins and the latter doesn't, but the latter will still be reading from ~/.config/nvim/.

samhh commented 2 years ago

Some Home Manager programs expose config.programs.<program>.finalPackage, however this is hidden for Neovim: https://github.com/nix-community/home-manager/blob/688e5c85b7537f308b82167c8eb4ecfb70a49861/modules/programs/neovim.nix#L214

samhh commented 2 years ago

No change if editorBin references pkgs.neovim-unwrapped to match editor.nix.

samhh commented 2 years ago

https://github.com/samhh/dotfiles/commit/3db3fcea8150fc3ba02b2cab6972a84cd00a7160