From b6e728a3a329f56be2bdcd633249b3dd5efe5bbd Mon Sep 17 00:00:00 2001 From: "Matthieu C." <886074+teto@users.noreply.github.com> Date: Wed, 25 Sep 2024 22:37:00 +0200 Subject: [PATCH] Reapply "programs.neovim: link packpath dir in XDG_DATA_HOME (#3717)" (#3817) This reverts commit 0e065e1b6f0776ebbacea9dcbc977af7bc9eddc0. --- modules/programs/neovim.nix | 8 ++++++++ 1 file changed, 8 insertions(+) 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 (