From 8e54cc6a8a56d0c508ba88ece31c218ab33793f3 Mon Sep 17 00:00:00 2001 From: Tomasz Rybarczyk Date: Tue, 19 Sep 2017 18:02:22 +0200 Subject: [PATCH] vim: fix boolean option handling Vim doesn't have `unset` function. To turn off an option vim uses "no" prefix. --- modules/programs/vim.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/programs/vim.nix b/modules/programs/vim.nix index e246c21f..e2050cbf 100644 --- a/modules/programs/vim.nix +++ b/modules/programs/vim.nix @@ -19,7 +19,6 @@ in default = null; description = "Whether to show line numbers."; }; - tabSize = mkOption { type = types.nullOr types.int; default = null; @@ -57,7 +56,7 @@ in config = ( let - optionalBoolean = name: val: optionalString (val != null) (if val then "set ${name}" else "unset ${name}"); + optionalBoolean = name: val: optionalString (val != null) (if val then "set ${name}" else "set no${name}"); optionalInteger = name: val: optionalString (val != null) "set ${name}=${toString val}"; customRC = '' ${optionalBoolean "number" cfg.lineNumbers}