From 17d8409109e4764a1c7989c9512731f988998b6d Mon Sep 17 00:00:00 2001 From: Kalle Jepsen Date: Sat, 28 Oct 2023 14:53:06 +0200 Subject: [PATCH] basic: declare option to set smartcase or ignorecase --- modules/basic/config.nix | 12 ++++++++++++ modules/basic/module.nix | 6 ++++++ 2 files changed, 18 insertions(+) diff --git a/modules/basic/config.nix b/modules/basic/config.nix index 541426c..82d8648 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 516a4ba..8bee1a6 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"; + }; }; }