From 55030c83024bf2d10ff86f3874b91794b9d32722 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Fri, 19 Feb 2021 09:52:46 +0100 Subject: [PATCH] neovim: deprecate programs.neovim.configure (#1810) The `configure` option is not type checked and an artifact of how nixpkgs is implemented. We now have the equivalent options in home-manager and managing interactions between the 2 systems complexifies maintainance of the module. Please use the other options at your disposal: configure.packages.*.opt -> programs.neovim.plugins = [ { plugin = ...; optional = true; }] configure.packages.*.start -> programs.neovim.plugins = [ { plugin = ...; }] configure.customRC -> programs.neovim.extraConfig --- doc/release-notes/rl-2105.adoc | 10 ++++++++++ modules/programs/neovim.nix | 15 ++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/doc/release-notes/rl-2105.adoc b/doc/release-notes/rl-2105.adoc index 4fe8953ae..c68fba51a 100644 --- a/doc/release-notes/rl-2105.adoc +++ b/doc/release-notes/rl-2105.adoc @@ -101,6 +101,16 @@ https://github.com/jonls/redshift/blob/master/redshift.conf.sample[redshift.conf https://gitlab.com/chinstrap/gammastep/-/blob/master/gammastep.conf.sample[gammastep.conf.sample] for the available additional options in each program. +* The `programs.neovim.configure` is deprecated in favor of other `programs.neovim` options; +please use the other options at your disposal: ++ +[source,nix] +---- +configure.packages.*.opt -> programs.neovim.plugins = [ { plugin = ...; optional = true; }] +configure.packages.*.start -> programs.neovim.plugins = [ { plugin = ...; }] +configure.customRC -> programs.neovim.extraConfig +---- + [[sec-release-21.05-state-version-changes]] === State Version Changes diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index 78f54ed66..4390654b2 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -183,6 +183,8 @@ in { }; ''; description = '' + Deprecated. Please use the other options. + Generate your init file from your list of plugins and custom commands, and loads it from the store via nvim -u /nix/store/hash-vimrc @@ -250,11 +252,14 @@ in { }; in mkIf cfg.enable { - assertions = [{ - assertion = cfg.configure == { } || moduleConfigure == { }; - message = "The programs.neovim option configure is mutually exclusive" - + " with extraConfig and plugins."; - }]; + warnings = optional (cfg.configure != { }) '' + programs.neovim.configure is deprecated. + Other programs.neovim options can override its settings or ignore them. + Please use the other options at your disposal: + configure.packages.*.opt -> programs.neovim.plugins = [ { plugin = ...; optional = true; }] + configure.packages.*.start -> programs.neovim.plugins = [ { plugin = ...; }] + configure.customRC -> programs.neovim.extraConfig + ''; home.packages = [ cfg.finalPackage ];