diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index 8632a7ec8..00d3ca8b7 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -416,6 +416,14 @@ in { home.shellAliases = mkIf cfg.vimdiffAlias { vimdiff = "nvim -d"; }; + # 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 (