mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 08:35:43 +02:00
plugin/luasnip: Add jsregexp lua dependency (#274)
The lua dependency is required to perform transforms (luasnip can fallback to a simpler algorithm if it's absent). This requires us to expose the `extraLuaPackages` option of makeNeovimConfig.
This commit is contained in:
parent
ff063b27bd
commit
bd4384a2e5
2 changed files with 8 additions and 1 deletions
|
@ -103,6 +103,12 @@ in {
|
||||||
readOnly = true;
|
readOnly = true;
|
||||||
visible = false;
|
visible = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraLuaPackages = mkOption {
|
||||||
|
type = types.functionTo (types.listOf types.package);
|
||||||
|
description = "Extra lua packages to include with neovim";
|
||||||
|
default = _: [];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = let
|
config = let
|
||||||
|
@ -122,7 +128,7 @@ in {
|
||||||
config.extraPlugins;
|
config.extraPlugins;
|
||||||
|
|
||||||
neovimConfig = pkgs.neovimUtils.makeNeovimConfig ({
|
neovimConfig = pkgs.neovimUtils.makeNeovimConfig ({
|
||||||
inherit (config) viAlias vimAlias;
|
inherit (config) viAlias vimAlias extraLuaPackages;
|
||||||
# inherit customRC;
|
# inherit customRC;
|
||||||
plugins = normalizedPlugins;
|
plugins = normalizedPlugins;
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,6 +91,7 @@ in {
|
||||||
in
|
in
|
||||||
mkIf cfg.enable {
|
mkIf cfg.enable {
|
||||||
extraPlugins = [cfg.package];
|
extraPlugins = [cfg.package];
|
||||||
|
extraLuaPackages = ps: [ps.jsregexp];
|
||||||
extraConfigLua = concatStringsSep "\n" fromVscodeLoaders;
|
extraConfigLua = concatStringsSep "\n" fromVscodeLoaders;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue