1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 16:38:34 +02:00

neovim: drop python2 support (#1978)

Nixpkgs did the same in https://github.com/NixOS/nixpkgs/pull/121339.
This commit is contained in:
Robert Schütz 2021-05-04 05:47:08 +02:00 committed by GitHub
parent 225bf275ba
commit e0ee5068dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,14 +6,6 @@ let
cfg = config.programs.neovim;
extraPythonPackageType = mkOptionType {
name = "extra-python-packages";
description = "python packages in python.withPackages format";
check = with types;
(x: if isFunction x then isList (x pkgs.pythonPackages) else false);
merge = mergeOneOption;
};
extraPython3PackageType = mkOptionType {
name = "extra-python3-packages";
description = "python3 packages in python.withPackages format";
@ -67,6 +59,13 @@ let
''--suffix PATH : "${lib.makeBinPath cfg.extraPackages}"'';
in {
imports = [
(mkRemovedOptionModule [ "programs" "neovim" "withPython" ]
"Python2 support has been removed from neovim.")
(mkRemovedOptionModule [ "programs" "neovim" "extraPythonPackages" ]
"Python2 support has been removed from neovim.")
];
options = {
programs.neovim = {
enable = mkEnableOption "Neovim";
@ -104,26 +103,6 @@ in {
'';
};
withPython = mkOption {
type = types.bool;
default = true;
description = ''
Enable Python 2 provider. Set to <literal>true</literal> to
use Python 2 plugins.
'';
};
extraPythonPackages = mkOption {
type = with types; either extraPythonPackageType (listOf package);
default = (_: [ ]);
defaultText = "ps: []";
example = literalExample "(ps: with ps; [ pandas jedi ])";
description = ''
A function in python.withPackages format, which returns a
list of Python 2 packages required for your plugins to work.
'';
};
withRuby = mkOption {
type = types.nullOr types.bool;
default = true;
@ -245,8 +224,7 @@ in {
config = let
neovimConfig = pkgs.neovimUtils.makeNeovimConfig {
inherit (cfg)
extraPython3Packages withPython3 extraPythonPackages withPython
withNodeJs withRuby viAlias vimAlias;
extraPython3Packages withPython3 withNodeJs withRuby viAlias vimAlias;
configure = cfg.configure // moduleConfigure;
plugins = cfg.plugins;
};