From e0ee5068ddefd49728484c18fa032de05be440bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Tue, 4 May 2021 05:47:08 +0200 Subject: [PATCH] neovim: drop python2 support (#1978) Nixpkgs did the same in https://github.com/NixOS/nixpkgs/pull/121339. --- modules/programs/neovim.nix | 38 ++++++++----------------------------- 1 file changed, 8 insertions(+), 30 deletions(-) diff --git a/modules/programs/neovim.nix b/modules/programs/neovim.nix index e5b2c0c51..4a8bd3d1b 100644 --- a/modules/programs/neovim.nix +++ b/modules/programs/neovim.nix @@ -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 true 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; };