From 93c8643fd81898fe36b59097dcaaa4cbb42d163a Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Sun, 30 Jul 2023 18:32:53 +0300 Subject: [PATCH] feat(modules/basic): make leader key configurable --- modules/basic/config.nix | 3 +++ modules/basic/module.nix | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/modules/basic/config.nix b/modules/basic/config.nix index d5105057..6e4237c3 100644 --- a/modules/basic/config.nix +++ b/modules/basic/config.nix @@ -142,6 +142,9 @@ in { set spell set spelllang=${toString cfg.spellChecking.language} ''} + ${optionalString (cfg.leaderKey != null) '' + let mapleader = "${toString cfg.leaderKey}" + ''} ''; }; } diff --git a/modules/basic/module.nix b/modules/basic/module.nix index ade7d105..3f8e49a7 100644 --- a/modules/basic/module.nix +++ b/modules/basic/module.nix @@ -31,6 +31,12 @@ with builtins; { }; }; + leaderKey = mkOption { + type = with types; nullOr str; + default = null; + description = "The leader key to be used internally"; + }; + colourTerm = mkOption { type = types.bool; default = true;