diff --git a/core/core-editor.el b/core/core-editor.el index 242539d67..58538cbec 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -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." diff --git a/modules/module-data.el b/modules/module-data.el index ea9c4bf6b..cc9787f9a 100644 --- a/modules/module-data.el +++ b/modules/module-data.el @@ -1,6 +1,5 @@ ;;; module-data.el -(associate! conf-mode :match "/\\.?editorconfig$") (associate! nxml-mode :match "\\.plist$") (use-package toml-mode :mode "\\.toml$")