diff --git a/flake.lock b/flake.lock index 72912dee..3ced812a 100644 --- a/flake.lock +++ b/flake.lock @@ -38,11 +38,11 @@ }, "mnw": { "locked": { - "lastModified": 1741647548, - "narHash": "sha256-UqVAeOylufUGIx7BXSneFHD8eI6n0sVwEY2noFENnSE=", + "lastModified": 1742255973, + "narHash": "sha256-XfEGVKatTgEMMOVb4SNp1LYLQOSzzrFTDMVDTZFyMVE=", "owner": "Gerg-L", "repo": "mnw", - "rev": "3fb89e600e26b91d1795cf8a1a34e11e084b4a04", + "rev": "b982dbd5e6d55d4438832b3567c09bc2a129649d", "type": "github" }, "original": { diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index d145f798..3c778169 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -6,9 +6,8 @@ ... }: let inherit (pkgs) vimPlugins; - inherit (lib.strings) isString; - inherit (lib.lists) filter map; - inherit (builtins) path; + inherit (lib.trivial) flip; + inherit (builtins) path filter isString; getPin = name: ((pkgs.callPackages ../../../npins/sources.nix {}) // config.vim.pluginOverrides).${name}; @@ -76,13 +75,6 @@ buildConfigPlugins config.vim.optPlugins ); - # additional Lua and Python3 packages, mapped to their respective functions - # to conform to the format mnw expects. end user should - # only ever need to pass a list of packages, which are modified - # here - extraLuaPackages = ps: map (x: ps.${x}) config.vim.luaPackages; - extraPython3Packages = ps: map (x: ps.${x}) config.vim.python3Packages; - # Wrap the user's desired (unwrapped) Neovim package with arguments that'll be used to # generate a wrapped Neovim package. neovim-wrapped = inputs.mnw.lib.wrap pkgs { @@ -92,9 +84,17 @@ extraBinPath = config.vim.extraPackages; initLua = config.vim.builtLuaConfigRC; luaFiles = config.vim.extraLuaFiles; + providers = { + python3 = { + enable = config.vim.withPython3; + extraPackages = ps: map (flip builtins.getAttr ps) config.vim.python3Packages; + }; + ruby.enable = config.vim.withRuby; + nodeJs.enable = config.vim.withNodeJs; + }; + aliases = lib.optional config.vim.viAlias "vi" ++ lib.optional config.vim.vimAlias "vim"; - inherit (config.vim) viAlias vimAlias withRuby withNodeJs withPython3; - inherit extraLuaPackages extraPython3Packages; + extraLuaPackages = ps: map (flip builtins.getAttr ps) config.vim.luaPackages; }; dummyInit = pkgs.writeText "nvf-init.lua" config.vim.builtLuaConfigRC;