doom

My literate doom emacs config
git clone https://github.com/michaelneuper/doom.git
Files | Log | Refs

commit 801116002254c0b9abfbd9d18cde87c5d0bf579b
parent fc2fc67986793204729fa0bb4cf76f4a0ec3b4eb
Author: Michael Neuper <michael@michaelneuper.com>
Date:   Thu, 28 Nov 2024 15:49:01 +0200

add eye candy

- add and configure spacious-padding
- disable solaire mode
- add +pretty flag to org
- disable current line highlighting
- change opening size
- change frame title

Diffstat:
Mconfig.org | 84+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------
Minit.el | 2+-
Mpackages.el | 3+++
3 files changed, 78 insertions(+), 11 deletions(-)

diff --git a/config.org b/config.org @@ -33,17 +33,40 @@ mac-right-option-modifier 'super)) ; line numbers +;; TODO change to only in org mode (setq display-line-numbers-type 'visual) -(custom-set-faces! ; don't make line numbers italic - '(line-number :slant normal) - '(line-number-current-line :slant normal)) + +(add-hook! display-line-numbers-mode + (custom-set-faces! ; don't make line numbers italic + '(line-number :slant normal) + '(line-number-current-line :slant normal))) ; column fill indicator (setq display-fill-column-indicator-column 80) (add-hook 'prog-mode-hook #'display-fill-column-indicator-mode) +; don't highlight current line +(setq global-hl-line-modes nil) + (pixel-scroll-precision-mode 1) +(add-to-list 'default-frame-alist '(width . 100)) +(add-to-list 'default-frame-alist '(height . 40)) + +;; https://hieuphay.com/doom-emacs-config/#some-good-defaults +(setq frame-title-format + '("" + (:eval + (if (s-contains-p org-roam-directory (or buffer-file-name "")) + (replace-regexp-in-string + ".*/[0-9]*-?" "☰ " + (subst-char-in-string ?_ ? buffer-file-name)) + "%b")) + (:eval + (let ((project-name (projectile-project-name))) + (unless (string= "-" project-name) + (format (if (buffer-modified-p) " ◉ %s" "  ●  %s") project-name)))))) + ; make emacs faster (use-package! gcmh :init @@ -120,8 +143,7 @@ Add keybindings for [[https:https://github.com/copilot-emacs/copilot.el][copilot (insert "\n" (+doom-dashboard--center +doom-dashboard--width "Welcome back to Emacs!")) (setq mode-line-format nil) (hl-line-mode 0) - (read-only-mode +1) - (solaire-mode 0)) + (read-only-mode +1)) (setq-hook! '+doom-dashboard-mode-hook evil-normal-state-cursor (list nil)) @@ -158,12 +180,15 @@ Add keybindings for [[https:https://github.com/copilot-emacs/copilot.el][copilot doom-modeline-enable-word-count nil doom-modeline-buffer-encoding t doom-modeline-major-mode-icon t + doom-modeline-bar-width 0 doom-modeline-height 25 - doom-modeline-modal nil) + doom-modeline-modal nil)) - (when (eq doom-theme 'doom-gruvbox) - (custom-set-faces - '(mode-line ((t (:background "#282828"))))))) +;; TODO remove +;; (when (eq doom-theme 'doom-gruvbox) +;; (custom-set-faces +;; '(mode-line ((t (:background "#3c3836")))) +;; '(mode-line-active ((t (:background "#3c3836")))))) ; other bg: #282828 #+end_src *** zen #+begin_src emacs-lisp @@ -174,13 +199,31 @@ Add keybindings for [[https:https://github.com/copilot-emacs/copilot.el][copilot (setq variable-pitch-serif-font doom-variable-pitch-font) (set-face-attribute 'variable-pitch nil :height 1.2)) #+end_src +*** other +**** spacious-padding +Add padding to emacs frames and windows with [[doom-package:spacious-padding][spacious-padding]]. +See [[https://protesilaos.com/emacs/spacious-padding]] for configuration options. +#+begin_src emacs-lisp +(use-package! spacious-padding + :ensure t + :config + (setq spacious-padding-widths + '( :internal-border-width 15 + :header-line-width 4 + :mode-line-width 4 + :tab-width 4 + :right-divider-width 30 + :scroll-bar-width 8 + :fringe-width 0)) + (spacious-padding-mode 1)) +#+end_src ** :emacs *** dired #+begin_src emacs-lisp (after! dirvish (setq! dirvish-quick-access-entries `(("h" "~/" "Home") - ("e" doom-user-dir "Doom config") + ("e" ,doom-user-dir "Doom config") ("c" "~/Developer/" "Code") ("d" "~/Downloads/" "Downloads") ("g" "~/GitHub/" "GitHub") @@ -228,6 +271,27 @@ Improve =eglot= performance. org-hide-emphasis-markers t) (after! org + (custom-set-faces! + `((org-document-title) + :foreground ,(face-attribute 'org-document-title :foreground) + :height 1.3 :weight bold) + `((org-level-1) + :foreground ,(face-attribute 'outline-1 :foreground) + :height 1.1 :weight medium) + `((org-level-2) + :foreground ,(face-attribute 'outline-2 :foreground) + :weight medium) + `((org-level-3) + :foreground ,(face-attribute 'outline-3 :foreground) + :weight medium) + `((org-level-4) + :foreground ,(face-attribute 'outline-4 :foreground) + :weight medium) + `((org-level-5) + :foreground ,(face-attribute 'outline-5 :foreground) + :weight medium))) + +(after! org (add-to-list 'org-latex-packages-alist '("" "amsmath" t)) (add-to-list 'org-latex-packages-alist '("" "amssymb" t)) (add-to-list 'org-latex-packages-alist '("" "mathtools" t)) diff --git a/init.el b/init.el @@ -138,7 +138,7 @@ ;;nim ; python + lisp at the speed of c ;;nix ; I hereby declare "nix geht mehr!" ;;ocaml ; an objective camel - (org +roam2) ; organize your plain life in plain text + (org +pretty +roam2) ; organize your plain life in plain text ;;php ; perl's insecure younger brother ;;plantuml ; diagrams for confusing people more ;;graphviz ; diagrams for confusing yourself even more diff --git a/packages.el b/packages.el @@ -1,6 +1,8 @@ ;; -*- no-byte-compile: t; -*- ;;; $DOOMDIR/packages.el +(package! solaire-mode :disable t) + (package! org :pin "806abc5a2bbcb5f884467a0145547221ba09eb59") (package! xenops) ; org-latex previews @@ -9,5 +11,6 @@ :recipe (:host github :repo "copilot-emacs/copilot.el" :files ("*.el"))) (package! copilot-chat :recipe (:host github :repo "chep/copilot-chat.el" :files ("*.el"))) +(package! spacious-padding) (package! eglot-booster :recipe (:host github :repo "jdtsmith/eglot-booster"))