From 35143b7ddafa899a0668a0f2cc695c7e8886b1ae Mon Sep 17 00:00:00 2001 From: Frothy <76622149+FrothyMarrow@users.noreply.github.com> Date: Sat, 17 Feb 2024 17:03:47 -0500 Subject: [PATCH 1/2] wrapper: optionally wrap neovim with extra lua packages --- modules/core/default.nix | 8 ++++++++ modules/default.nix | 4 ++++ 2 files changed, 12 insertions(+) diff --git a/modules/core/default.nix b/modules/core/default.nix index e4703b6..13534a4 100644 --- a/modules/core/default.nix +++ b/modules/core/default.nix @@ -209,6 +209,14 @@ in { }''; }; + luaPackages = mkOption { + type = types.listOf types.str; + default = []; + description = '' + List of lua packages to install. + ''; + }; + globals = mkOption { default = {}; description = "Set containing global variable values"; diff --git a/modules/default.nix b/modules/default.nix index 31cf87d..c9703b9 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -23,6 +23,8 @@ inputs: { vimOptions = module.config.vim; + extraLuaPackages = ps: map (x: ps.${x}) vimOptions.luaPackages; + buildPlug = {pname, ...} @ args: assert lib.asserts.assertMsg (pname != "nvim-treesitter") "Use buildTreesitterPlug for building nvim-treesitter."; buildVimPlugin (args @@ -59,6 +61,8 @@ inputs: { inherit (vimOptions) viAlias; inherit (vimOptions) vimAlias; + inherit extraLuaPackages; + configure = { customRC = vimOptions.builtConfigRC; From 949a60c569ded7b4bdcf6b55177f7fd91e5ec0d8 Mon Sep 17 00:00:00 2001 From: Frothy <76622149+FrothyMarrow@users.noreply.github.com> Date: Sat, 17 Feb 2024 18:10:06 -0500 Subject: [PATCH 2/2] docs: add entry for `vim.luaPackages` option --- docs/release-notes/rl-0.6.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/release-notes/rl-0.6.md b/docs/release-notes/rl-0.6.md index 061555f..01fbe62 100644 --- a/docs/release-notes/rl-0.6.md +++ b/docs/release-notes/rl-0.6.md @@ -48,3 +48,7 @@ Release notes for release 0.6 [elijahimmer](https://github.com/elijahimmer) - Added rose-pine theme + +[frothymarrow](https://github.com/frothymarrow) + +- Added option `vim.luaPackages` to wrap neovim with extra Lua packages.