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)
This commit is contained in:
Henrik Lissner
2019-03-09 03:41:26 -05:00
parent 1a6f0c2f1d
commit 66d75936fc
5 changed files with 168 additions and 115 deletions

View File

@@ -0,0 +1,32 @@
;;; 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"))