flake: update mnw (#723)

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

6
flake.lock generated
View file

@ -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": {

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;