diff --git a/docs/release-notes/release-notes.md b/docs/release-notes/release-notes.md index daeb03ea..3df0c64b 100644 --- a/docs/release-notes/release-notes.md +++ b/docs/release-notes/release-notes.md @@ -1,7 +1,6 @@ # Release Notes {#ch-release-notes} -This section lists the release notes for tagged version of **nvf** and the -current main current main branch +This section lists the release notes for tagged version of **nvf** and the current main branch ```{=include=} chapters rl-0.1.md @@ -11,4 +10,5 @@ rl-0.4.md rl-0.5.md rl-0.6.md rl-0.7.md +rl-0.8.md ``` diff --git a/modules/wrapper/build/config.nix b/modules/wrapper/build/config.nix index a1807388..dc3b4c73 100644 --- a/modules/wrapper/build/config.nix +++ b/modules/wrapper/build/config.nix @@ -7,7 +7,13 @@ }: let inherit (pkgs) vimPlugins; inherit (lib.trivial) flip; - inherit (builtins) filter isString hasAttr getAttr; + inherit + (builtins) + filter + isString + hasAttr + getAttr + ; getPin = flip getAttr (pkgs.callPackages ../../../npins/sources.nix {}); @@ -52,21 +58,23 @@ }; buildConfigPlugins = plugins: - map (plug: - if (isString plug) - then - if hasAttr plug config.vim.pluginOverrides + map ( + plug: + if (isString plug) then - (let - plugin = config.vim.pluginOverrides.${plug}; - in - if (lib.isType "flake" plugin) - then plugin // {name = plug;} - else plugin) - else pluginBuilders.${plug} or (noBuildPlug plug) - else plug) ( - filter (f: f != null) plugins - ); + if hasAttr plug config.vim.pluginOverrides + then + ( + let + plugin = config.vim.pluginOverrides.${plug}; + in + if (lib.isType "flake" plugin) + then plugin // {name = plug;} + else plugin + ) + else pluginBuilders.${plug} or (noBuildPlug plug) + else plug + ) (filter (f: f != null) plugins); # Wrap the user's desired (unwrapped) Neovim package with arguments that'll be used to # generate a wrapped Neovim package. @@ -76,7 +84,7 @@ start = buildConfigPlugins config.vim.startPlugins; opt = buildConfigPlugins config.vim.optPlugins; }; - appName = "nvf"; + appName = config.vim.appName; extraBinPath = config.vim.extraPackages; initLua = config.vim.builtLuaConfigRC; luaFiles = config.vim.extraLuaFiles; @@ -103,7 +111,11 @@ # or module consumption. neovim = pkgs.symlinkJoin { name = "nvf-with-helpers"; - paths = [neovim-wrapped printConfig printConfigPath]; + paths = [ + neovim-wrapped + printConfig + printConfigPath + ]; postBuild = "echo Helpers added"; # Allow evaluating config.vim, i.e., config.vim from the packages' passthru diff --git a/modules/wrapper/environment/options.nix b/modules/wrapper/environment/options.nix index c401f506..c58ec1c2 100644 --- a/modules/wrapper/environment/options.nix +++ b/modules/wrapper/environment/options.nix @@ -4,10 +4,27 @@ ... }: let inherit (lib.options) mkOption mkEnableOption literalMD; - inherit (lib.types) package bool str listOf attrsOf; + inherit + (lib.types) + package + bool + str + listOf + attrsOf + ; inherit (lib.nvim.types) pluginsOpt extraPluginType; in { options.vim = { + appName = mkOption { + type = str; + default = "nvf"; + description = '' + The neovim application name corresponding to the + `NVIM_APPNAME` + [environment variable](https://neovim.io/doc/user/starting/#_nvim_appname). + ''; + }; + package = mkOption { type = package; default = pkgs.neovim-unwrapped; @@ -101,7 +118,7 @@ in { extraPackages = mkOption { type = listOf package; default = []; - example = ''[pkgs.fzf pkgs.ripgrep]''; + example = "[pkgs.fzf pkgs.ripgrep]"; description = '' List of additional packages to make available to the Neovim wrapper.