Skip to content

Instantly share code, notes, and snippets.

@Jomik
Created December 29, 2018 16:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jomik/e1b6058fe94724aba078018cd3c6bbb0 to your computer and use it in GitHub Desktop.
Save Jomik/e1b6058fe94724aba078018cd3c6bbb0 to your computer and use it in GitHub Desktop.
{ 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