diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index df4b487d6..b5733a8b9 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -394,6 +394,14 @@ in { home.sessionVariables = mkIf cfg.defaultEditor { EDITOR = "nvim"; }; + # link the packpath in expected folder so that even unwrapped neovim can pick + # home-manager's plugins + xdg.dataFile = mkMerge (mapAttrsToList (name: val: { + "nvim/site" = { + source = pkgs.vimUtils.packDir neovimConfig.packpathDirs; + }; + }) neovimConfig.packpathDirs); + xdg.configFile = let hasLuaConfig = hasAttr "lua" config.programs.neovim.generatedConfigs; in mkMerge (