Refactor editorconfig conf in core-editor

This commit is contained in:
Henrik Lissner 2016-04-30 23:12:46 -04:00
parent 328156f1bd
commit a2e706862b
2 changed files with 6 additions and 7 deletions

View file

@ -72,8 +72,12 @@
(recentf-mode 1)
;; Let editorconfig handle global whitespace settings
(require 'editorconfig)
(editorconfig-mode +1)
(use-package editorconfig
:config
(editorconfig-mode +1)
;; So whitespace in tabs indentation mode
(add-hook! 'editorconfig-custom-hooks (if indent-tabs-mode (whitespace-mode +1)))
(associate! editorconfig-conf-mode :match "/\\.?editorconfig$"))
;;
@ -113,10 +117,6 @@ enable multiple minor modes for the same regexp.")
(add-hook! special-mode (setq truncate-lines nil))
;; So whitespace in tabs indentation mode
(add-hook 'editorconfig-custom-hooks
(lambda (&rest _) (if indent-tabs-mode (whitespace-mode +1))))
(defadvice delete-trailing-whitespace
(around delete-trailing-whitespace-ignore-line activate)
"Don't delete trailing whitespace on current line, if in insert mode."

View file

@ -1,6 +1,5 @@
;;; module-data.el
(associate! conf-mode :match "/\\.?editorconfig$")
(associate! nxml-mode :match "\\.plist$")
(use-package toml-mode :mode "\\.toml$")