mirror of
https://github.com/nix-community/home-manager
synced 2024-12-25 03:09:47 +01:00
vim: remove deprecated options
This commit is contained in:
parent
c17f37857c
commit
34bbd0ded1
1 changed files with 4 additions and 47 deletions
|
@ -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;
|
|
||||||
})
|
|
||||||
])
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue