From 383f7acc05c7b296309ed7c5cb609962c1833e18 Mon Sep 17 00:00:00 2001 From: Tomasz Rybarczyk Date: Tue, 19 Sep 2017 18:08:29 +0200 Subject: [PATCH] vim: add expandTab option --- modules/programs/vim.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/programs/vim.nix b/modules/programs/vim.nix index e2050cbf..5c1a02e7 100644 --- a/modules/programs/vim.nix +++ b/modules/programs/vim.nix @@ -19,6 +19,11 @@ in default = null; description = "Whether to show line numbers."; }; + expandTab = mkOption { + type = types.nullOr types.bool; + default = null; + description = "Whether to convert tabs into spaces."; + }; tabSize = mkOption { type = types.nullOr types.int; default = null; @@ -60,6 +65,7 @@ in optionalInteger = name: val: optionalString (val != null) "set ${name}=${toString val}"; customRC = '' ${optionalBoolean "number" cfg.lineNumbers} + ${optionalBoolean "expandtab" cfg.expandTab} ${optionalInteger "tabstop" cfg.tabSize} ${optionalInteger "shiftwidth" cfg.tabSize}