Moving to Doom Emacs!

This commit is contained in:
Derek Taylor
2019-12-16 20:21:19 -06:00
parent d9f2f456f1
commit d4b4c33550
683 changed files with 51877 additions and 100 deletions

View File

@@ -0,0 +1,18 @@
;;; emacs/electric/config.el -*- lexical-binding: t; -*-
;; Smarter, keyword-based electric-indent
(defvar-local +electric-indent-words '()
"The list of electric words. Typing these will trigger reindentation of the
current line.")
;;
(after! electric
(setq-default electric-indent-chars '(?\n ?\^?))
(add-hook! 'electric-indent-functions
(defun +electric-indent-char-fn (_c)
(when (and (eolp) +electric-indent-words)
(save-excursion
(backward-word)
(looking-at-p (concat "\\<" (regexp-opt +electric-indent-words))))))))