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
This commit is contained in:
Matthieu Coudron 2021-02-19 09:52:46 +01:00 committed by GitHub
parent 2e795f3efd
commit 55030c8302
Failed to generate hash of commit
2 changed files with 20 additions and 5 deletions

View file

@ -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] https://gitlab.com/chinstrap/gammastep/-/blob/master/gammastep.conf.sample[gammastep.conf.sample]
for the available additional options in each program. 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]] [[sec-release-21.05-state-version-changes]]
=== State Version Changes === State Version Changes

View file

@ -183,6 +183,8 @@ in {
}; };
''; '';
description = '' description = ''
Deprecated. Please use the other options.
Generate your init file from your list of plugins and custom commands, Generate your init file from your list of plugins and custom commands,
and loads it from the store via <command>nvim -u /nix/store/hash-vimrc</command> and loads it from the store via <command>nvim -u /nix/store/hash-vimrc</command>
@ -250,11 +252,14 @@ in {
}; };
in mkIf cfg.enable { in mkIf cfg.enable {
assertions = [{ warnings = optional (cfg.configure != { }) ''
assertion = cfg.configure == { } || moduleConfigure == { }; programs.neovim.configure is deprecated.
message = "The programs.neovim option configure is mutually exclusive" Other programs.neovim options can override its settings or ignore them.
+ " with extraConfig and plugins."; 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 ]; home.packages = [ cfg.finalPackage ];