aboutsummaryrefslogtreecommitdiff
path: root/init.el
diff options
context:
space:
mode:
authorMountain Man <43313373+MountainMan1312@users.noreply.github.com>2023-05-05 23:02:48 -0400
committerMountain Man <43313373+MountainMan1312@users.noreply.github.com>2023-05-05 23:02:48 -0400
commitffd7f9c01f5a1b80d7aa17eb64dfb3d188ca8b23 (patch)
tree0bde8cd50f00f68f8c8dfafbb83e49e693c1d3cd /init.el
parentUse `org` and create a Section for PKMS stuff (diff)
downloadmmosmacs-ffd7f9c01f5a1b80d7aa17eb64dfb3d188ca8b23.tar.gz
mmosmacs-ffd7f9c01f5a1b80d7aa17eb64dfb3d188ca8b23.tar.bz2
mmosmacs-ffd7f9c01f5a1b80d7aa17eb64dfb3d188ca8b23.zip
Improve appearance of org buffers
Diffstat (limited to 'init.el')
-rw-r--r--init.el64
1 files changed, 63 insertions, 1 deletions
diff --git a/init.el b/init.el
index 382dd3d..6021a8d 100644
--- a/init.el
+++ b/init.el
@@ -117,6 +117,17 @@
117(load-theme 'jazz t) 117(load-theme 'jazz t)
118 118
119 119
120;; ---------------------------------
121;; Fonts
122;; -----
123;; For now I use Iosevka and Exo
124;; ---------------------------------
125
126(set-face-attribute 'default nil :font "Iosevka" :height 100)
127(set-face-attribute 'fixed-pitch nil :font "Iosevka" :height 100)
128(set-face-attribute 'variable-pitch nil :font "DejaVu Sans" :height 100 :weight 'regular)
129
130
120 131
121 132
122;; --------------------------------------------------------------------- 133;; ---------------------------------------------------------------------
@@ -366,8 +377,59 @@
366;; is the core of my PKMS system. 377;; is the core of my PKMS system.
367;; --------------------------------- 378;; ---------------------------------
368 379
380;; Setup run every time a buffer
381;; is opened.
382(defun mm/org-mode-setup ()
383 (org-indent-mode)
384 (auto-fill-mode)
385 (visual-line-mode)
386 (variable-pitch-mode))
387
388
389;; Org font stuff
390(defun mm/org-font-setup ()
391 ;; Replace hyphens in lists with dots
392 (font-lock-add-keywords 'org-mode
393 '(("^ *\\([-]\\) "
394 (0 (prog1 () (compose-region (match-beginning 1) (match-end 1) "•"))))))
395
396 ;; Set font size per heading level
397 (dolist (face '((org-level-1 . 1.5)
398 (org-level-2 . 1.4)
399 (org-level-3 . 1.3)
400 (org-level-4 . 1.2)
401 (org-level-5 . 1.1)
402 (org-level-6 . 1.1)
403 (org-level-7 . 1.1)
404 (org-level-8 . 1.1)))
405 (set-face-attribute (car face) nil :font "DejaVu Sans" :weight 'regular :height (cdr face)))
406
407
408 ;; Ensure anything that should be
409 ;; fixed-pitch actually is.
410 (set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
411 (set-face-attribute 'org-table nil :inherit 'fixed-pitch)
412 (set-face-attribute 'org-formula nil :inherit 'fixed-pitch)
413 (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
414 (set-face-attribute 'org-table nil :inherit '(shadow fixed-pitch))
415 (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
416 (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
417 (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
418 (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
419 (set-face-attribute 'line-number nil :inherit 'fixed-pitch)
420 (set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch))
421
422
423;; `org' configuration
369(use-package org 424(use-package org
370 :straight t) 425 :straight t
426 :hook (org-mode . mm/org-mode-setup)
427 :config
428 (setq org-ellipsis " ►"
429 org-hide-leading-stars t
430 org-adapt-indentation t
431 org-support-shift-select 'always)
432 (mm/org-font-setup))
371 433
372 434
373 435