Created
December 29, 2018 16:16
-
-
Save Jomik/e1b6058fe94724aba078018cd3c6bbb0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ... }: | |
with lib; | |
let | |
cfg = config.programs.emacs; | |
in { | |
options.programs.emacs = { | |
evil = mkEnableOption "Should we be evil?"; | |
leader = mkOption { | |
type = types.strMatching "."; | |
default = "/"; | |
}; | |
}; | |
config.programs.emacs = mkIf cfg.evil { | |
extraPackages = epkgs: with epgks; [ | |
evil | |
evil-leader | |
evil-collection | |
]; | |
init = { | |
evil = '' | |
(setq evil-want-integration nil) | |
(evil-collection-init) | |
(setq evil-collection-setup-minibuffer t) | |
(global-evil-leader-mode) | |
(evil-mode 1) | |
(evil-leader/set-leader "${cfg.leader}") | |
(setq evil-leader/in-all-states t) | |
''; | |
}; | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment