flake: update mnw (#723)

This commit is contained in:
Gerg-L 2025-03-18 09:51:20 +00:00 committed by GitHub
commit a297acc368
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 15 deletions

View file

@ -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;