diff --git a/modules/basic/config.nix b/modules/basic/config.nix index 541426c1..82d8648c 100644 --- a/modules/basic/config.nix +++ b/modules/basic/config.nix @@ -146,6 +146,18 @@ in { ${optionalString (cfg.leaderKey != null) '' let mapleader = "${toString cfg.leaderKey}" ''} + ${optionalString (cfg.searchCase == "ignore") '' + set nosmartcase + set ignorecase + ''} + ${optionalString (cfg.searchCase == "smart") '' + set noignorecase + set smartcase + ''} + ${optionalString (cfg.searchCase == "sensitive") '' + set noignorecase + set nosmartcase + ''} ''; }; } diff --git a/modules/basic/module.nix b/modules/basic/module.nix index 516a4ba1..8bee1a60 100644 --- a/modules/basic/module.nix +++ b/modules/basic/module.nix @@ -178,5 +178,11 @@ with builtins; { }; enableLuaLoader = mkEnableOption "experimental Lua module loader to speed up the start up process"; + + searchCase = mkOption { + type = types.enum ["ignore" "smart" "sensitive"]; + default = "sensitive"; + description = "Set the case sensitivity of search"; + }; }; }