Remove ws-butler+editorconfig hack

Now that it's supported upstream through
editorconfig-trim-whitespaces-mode
This commit is contained in:
Henrik Lissner 2020-03-27 21:14:47 -04:00
parent f6db32237d
commit 2e543f822a
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -21,6 +21,9 @@
(use-package! editorconfig (use-package! editorconfig
:after-call doom-switch-buffer-hook after-find-file :after-call doom-switch-buffer-hook after-find-file
:config :config
(when (require 'ws-butler nil t)
(setq editorconfig-trim-whitespaces-mode 'ws-butler-mode))
(defadvice! +editorconfig--smart-detection-a (orig-fn) (defadvice! +editorconfig--smart-detection-a (orig-fn)
"Retrieve the properties for the current file. If it doesn't have an "Retrieve the properties for the current file. If it doesn't have an
extension, try to guess one." extension, try to guess one."
@ -35,13 +38,6 @@ extension, try to guess one."
""))))) "")))))
(funcall orig-fn))) (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 (add-hook! 'editorconfig-after-apply-functions
(defun +editorconfig-disable-indent-detection-h (props) (defun +editorconfig-disable-indent-detection-h (props)
"Inhibit `dtrt-indent' if an explicit indent_style and indent_size is "Inhibit `dtrt-indent' if an explicit indent_style and indent_size is