From 1fc2ef3c05c696d18709a000d0ef3e8f520799ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyryl=20P=C5=82otnicki?= Date: Sun, 4 Sep 2022 09:52:17 +0100 Subject: [PATCH] add evil-collection keybindings to emacs --- nixos/home-manager/programs/emacs/emacs.nix | 8 ++++++-- nixos/home-manager/programs/emacs/home.nix | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/nixos/home-manager/programs/emacs/emacs.nix b/nixos/home-manager/programs/emacs/emacs.nix index 8d04eb90..40cd8ca8 100644 --- a/nixos/home-manager/programs/emacs/emacs.nix +++ b/nixos/home-manager/programs/emacs/emacs.nix @@ -3,8 +3,12 @@ let myEmacs = pkgs.emacs-nox; inherit ((pkgs.emacsPackagesFor myEmacs)) emacsWithPackages; in emacsWithPackages (epkgs: - (with epkgs.melpaStablePackages; [ magit solarized-theme evil ]) - ++ (with epkgs.melpaPackages; [ xterm-color nix-mode ]) + (with epkgs.melpaStablePackages; [ + magit + solarized-theme + evil + evil-collection + ]) ++ (with epkgs.melpaPackages; [ xterm-color nix-mode ]) ++ (with epkgs.elpaPackages; [ beacon # ; highlight my cursor when scrolling nameless # ; hide current package name everywhere in elisp code diff --git a/nixos/home-manager/programs/emacs/home.nix b/nixos/home-manager/programs/emacs/home.nix index 48c4bee0..bfcc8783 100644 --- a/nixos/home-manager/programs/emacs/home.nix +++ b/nixos/home-manager/programs/emacs/home.nix @@ -15,9 +15,12 @@ (set-terminal-parameter nil 'background-mode 'dark) (xterm-mouse-mode 1) + (setq evil-want-integration t) + (setq evil-want-keybinding nil) (require 'evil) + (when (require 'evil-collection nil t) + (evil-collection-init)) (evil-mode 1) - (setq custom-tab-width 2) (setq indent-tabs-mode nil)