From 2e543f822ae2a0321b64f1ade372b74c5f154468 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 27 Mar 2020 21:14:47 -0400 Subject: [PATCH] Remove ws-butler+editorconfig hack Now that it's supported upstream through editorconfig-trim-whitespaces-mode --- modules/tools/editorconfig/config.el | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/modules/tools/editorconfig/config.el b/modules/tools/editorconfig/config.el index 722690233..20d4c8007 100644 --- a/modules/tools/editorconfig/config.el +++ b/modules/tools/editorconfig/config.el @@ -21,6 +21,9 @@ (use-package! editorconfig :after-call doom-switch-buffer-hook after-find-file :config + (when (require 'ws-butler nil t) + (setq editorconfig-trim-whitespaces-mode 'ws-butler-mode)) + (defadvice! +editorconfig--smart-detection-a (orig-fn) "Retrieve the properties for the current file. If it doesn't have an extension, try to guess one." @@ -35,13 +38,6 @@ extension, try to guess one." ""))))) (funcall orig-fn))) - (add-hook! 'editorconfig-after-apply-functions - (defun +editorconfig-disable-ws-butler-maybe-h (props) - "Disable `ws-butler-mode' if trim_trailing_whitespace is true." - (when (and (equal (gethash 'trim_trailing_whitespace props) "true") - (bound-and-true-p ws-butler-mode)) - (ws-butler-mode -1)))) - (add-hook! 'editorconfig-after-apply-functions (defun +editorconfig-disable-indent-detection-h (props) "Inhibit `dtrt-indent' if an explicit indent_style and indent_size is