diff --git a/core/autoload/text.el b/core/autoload/text.el index 2dd0184e1..ee1108101 100644 --- a/core/autoload/text.el +++ b/core/autoload/text.el @@ -179,3 +179,13 @@ i.e. enables `ws-butler-mode' in the current buffer." i.e. disables `ws-butler-mode' in the current buffer." (ws-butler-mode -1)) + +;;;###autoload +(defun doom|enable-show-trailing-whitespace () + "Enable `show-trailing-whitespace' in the current buffer." + (setq-local show-trailing-whitespace t)) + +;;;###autoload +(defun doom|disable-show-trailing-whitespace () + "Disable `show-trailing-whitespace' in the current buffer." + (setq-local show-trailing-whitespace nil)) diff --git a/core/core-ui.el b/core/core-ui.el index afb44c567..c94fae38c 100644 --- a/core/core-ui.el +++ b/core/core-ui.el @@ -223,9 +223,18 @@ read-only or not file-visiting." ;; prompts the user for confirmation when deleting a non-empty frame (global-set-key [remap delete-frame] #'doom/delete-frame) -;; Show trailing whitespace -(setq show-trailing-whitespace t) -(setq-hook! 'minibuffer-setup-hook show-trailing-whitespace nil) ; except in minibuffers +;; Use this instead of whitespace-mode because it's faster (implemented in C) +(setq-default show-trailing-whitespace t) +;; Except in the minibuffer and read-only/special buffers +(setq-hook! 'minibuffer-setup-hook show-trailing-whitespace nil) +(setq-hook! 'change-major-mode-after-body-hook show-trailing-whitespace (not buffer-read-only)) + +;; The native border "consumes" a pixel of the fringe on righter-most splits, +;; `window-divider' does not. Available since Emacs 25.1. +(setq-default window-divider-default-places t + window-divider-default-bottom-width 1 + window-divider-default-right-width 1) +(add-hook 'doom-init-ui-hook #'window-divider-mode) ;; diff --git a/modules/lang/org/config.el b/modules/lang/org/config.el index 987424f28..b44efc722 100644 --- a/modules/lang/org/config.el +++ b/modules/lang/org/config.el @@ -474,8 +474,10 @@ conditions where a window's buffer hasn't changed at the time this hook is run." toc-org-enable ; auto-table of contents auto-fill-mode ; line wrapping ;; `show-paren-mode' causes flickering with indentation margins made by - ;; `org-indent-mode', so we simply turn off show-paren-mode altogether." + ;; `org-indent-mode', so we turn off show-paren-mode altogether doom|disable-show-paren-mode + ;; Shows a lot of false positives, so... + doom|disable-show-trailing-whitespace +org|enable-auto-reformat-tables +org|enable-auto-update-cookies