summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-08-30 07:55:59 -0700
committerFranck Cuny <franck@fcuny.net>2024-08-30 07:55:59 -0700
commit8eb697eec5ccbecb16c9c908107031ad986bb64d (patch)
tree920bd074836f434f5e43d3886620bb4fc44c4dc5
parentadd breadcrumb again (diff)
downloademacs.d-8eb697eec5ccbecb16c9c908107031ad986bb64d.tar.gz
move a few more things to init-window.el
-rw-r--r--config/init-programming.el3
-rw-r--r--config/init-ui.el6
-rw-r--r--config/init-window.el31
3 files changed, 31 insertions, 9 deletions
diff --git a/config/init-programming.el b/config/init-programming.el
index 45b344a..ce9445e 100644
--- a/config/init-programming.el
+++ b/config/init-programming.el
@@ -12,9 +12,6 @@
 (use-package elec-pair
   :hook (prog-mode . electric-pair-mode))
 
-;; `delete-trailing-whitespace' removes the tailing whitespace.
-(add-hook 'before-save-hook 'delete-trailing-whitespace)
-
 (use-package compile
   :ensure nil
   :hook (compilation-filter . ansi-color-compilation-filter)
diff --git a/config/init-ui.el b/config/init-ui.el
index 61e4070..7aa8946 100644
--- a/config/init-ui.el
+++ b/config/init-ui.el
@@ -51,12 +51,6 @@
                              ("Europe/London" "London")
                              ("Europe/Paris" "Paris")))
 
-(add-to-list 'display-buffer-alist '("\\*wclock\\*"
-                                     (display-buffer-in-side-window)
-                                     (side . left)
-                                     (slot . 0)
-                                     (window-width . 0.35)))
-
 ;; use various monaspace fonts
 ;; https://monaspace.githubnext.com
 (set-face-attribute 'default nil
diff --git a/config/init-window.el b/config/init-window.el
index 85aab8b..3224b29 100644
--- a/config/init-window.el
+++ b/config/init-window.el
@@ -18,6 +18,37 @@
   :init
   (breadcrumb-mode 1))
 
+(use-package whitespace
+  :ensure nil
+  :config
+  (setq whitespace-style
+        '(face
+          tabs
+          spaces
+          tab-mark
+          space-mark
+          trailing
+          missing-newline-at-eof
+          space-after-tab::tab
+          space-after-tab::space
+          space-before-tab::tab
+          space-before-tab::space)))
+
+(setq display-buffer-alist `(
+			     ("\\*wclock\\*"
+                              (display-buffer-in-side-window)
+                              (side . left)
+                              (slot . 0)
+                              (window-width . 0.35))
+			     ((or . ((derived-mode . flymake-diagnostics-buffer-mode)
+				     (derived-mode . flymake-project-diagnostics-mode)
+				     (derived-mode . messages-buffer-mode)
+				     (derived-mode . backtrace-mode)))
+			      (display-buffer-reuse-mode-window display-buffer-at-bottom)
+			      (window-height . 0.3)
+			      (dedicated . t)
+			      (preserve-size . (t . t)))))
+
 (provide 'init-window)
 
 ;;; init-window.el ends here