doomemacs/modules/config/default/+emacs.el
Henrik Lissner 66d75936fc
config/default: split into evil/emacs files
Done to better facilitate a non-evil config.

- Adds winum (and enables support for it in doom-modeline)
- Adds expand-region (#1231)
- Uses default smartparens config for non-evil users (WIP)
2019-03-09 03:43:14 -05:00

32 lines
773 B
EmacsLisp

;;; config/default/+emacs.el -*- lexical-binding: t; -*-
(require 'projectile) ; we need its keybinds immediately
;;
;;; Reasonable defaults
(setq shift-select-mode t)
(delete-selection-mode +1)
(def-package! expand-region
:commands (er/contract-region er/mark-symbol er/mark-word)
:config
(defun doom*quit-expand-region ()
"Properly abort an expand-region region."
(when (memq last-command '(er/expand-region er/contract-region))
(er/contract-region 0)))
(advice-add #'evil-escape :before #'doom*quit-expand-region)
(advice-add #'doom/escape :before #'doom*quit-expand-region))
(def-package! winum
:after-call (doom-switch-window-hook)
:config (winum-mode +1))
;;
;;; Keybinds
(when (featurep! +bindings)
(load! "+emacs-bindings"))