vim: remove deprecated options

This commit is contained in:
Nikita Uvarov 2018-10-20 10:54:44 +02:00 committed by Robert Helgesson
parent c17f37857c
commit 34bbd0ded1
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89

View file

@ -62,27 +62,6 @@ in
programs.vim = { programs.vim = {
enable = mkEnableOption "Vim"; enable = mkEnableOption "Vim";
lineNumbers = mkOption {
type = types.nullOr types.bool;
default = null;
description = ''
Whether to show line numbers. DEPRECATED: Use
<varname>programs.vim.settings.number</varname>.
'';
};
tabSize = mkOption {
type = types.nullOr types.int;
default = null;
example = 4;
description = ''
Set tab size and shift width to a specified number of
spaces. DEPRECATED: Use
<varname>programs.vim.settings.tabstop</varname> and
<varname>programs.vim.settings.shiftwidth</varname>.
'';
};
plugins = mkOption { plugins = mkOption {
type = types.listOf types.str; type = types.listOf types.str;
default = defaultPlugins; default = defaultPlugins;
@ -163,31 +142,9 @@ in
]; ];
}; };
in mkIf cfg.enable (mkMerge [ in mkIf cfg.enable {
{ programs.vim.package = vim;
programs.vim.package = vim; home.packages = [ cfg.package ];
home.packages = [ cfg.package ]; }
}
(mkIf (cfg.lineNumbers != null) {
warnings = [
("'programs.vim.lineNumbers' is deprecated, "
+ "use 'programs.vim.settings.number'")
];
programs.vim.settings.number = cfg.lineNumbers;
})
(mkIf (cfg.tabSize != null) {
warnings = [
("'programs.vim.tabSize' is deprecated, use "
+ "'programs.vim.settings.tabstop' and "
+ "'programs.vim.settings.shiftwidth'")
];
programs.vim.settings.tabstop = cfg.tabSize;
programs.vim.settings.shiftwidth = cfg.tabSize;
})
])
); );
} }