Add some prettify changes to org-mode.

This commit is contained in:
kj 2022-05-03 23:23:46 -04:00
parent 5536818ec3
commit 1678f7b283

View File

@ -8,13 +8,30 @@
;;; Code:
(defun kj/org-hook ()
"Configuración para el hook de 'org-mode'."
(display-line-numbers-mode 0)
(variable-pitch-mode 1)
(visual-line-mode 1)
(visual-fill-column-mode 1)
;; Configuración de font
;; Configuración de fonts
(set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face))
;; Ensure that anything that should be fixed-pitch in Org files appears that way
(set-face-attribute 'org-block nil :foreground nil :inherit 'fixed-pitch)
(set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-table nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch))
(set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch))
(set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)
;; Tachar los elementos "DONE"
(set-face-attribute 'org-done nil :strike-through t)
(set-face-attribute 'org-headline-done nil
:strike-through t
:foreground "light gray")
)
(use-package org
@ -32,6 +49,7 @@
(setq org-log-into-drawer t)
(setq org-cycle-separator-lines -1)
;; Identación
(org-indent-mode)
;; Palabras claves del To Do de org-mode
@ -46,6 +64,26 @@
("CANCELED" . "#aaa"))
)
;; Embellecer los checkbox
(add-hook 'org-mode-hook (lambda ()
"Beautify Org Checkbox Symbol"
(push '("[ ]" . "") prettify-symbols-alist)
(push '("[X]" . "" ) prettify-symbols-alist)
(push '("[-]" . "" ) prettify-symbols-alist)
(prettify-symbols-mode)))
;; Tachar los checkbox marcados como terminados
(defface org-checkbox-done-text
'((t (:foreground "#71696A" :strike-through t)))
"Face for the text part of a checked org-mode checkbox.")
(font-lock-add-keywords
'org-mode
`(("^[ \t]*\\(?:[-+*]\\|[0-9]+[).]\\)[ \t]+\\(\\(?:\\[@\\(?:start:\\)?[0-9]+\\][ \t]*\\)?\\[\\(?:X\\|\\([0-9]+\\)/\\2\\)\\][^\n]*\n\\)"
1 'org-checkbox-done-text prepend))
'append)
;; Archivos a usarse en org-agenda
(setq org-agenda-files
'("~/Proyectos/ORGenda/Ideas.org"
@ -82,15 +120,9 @@
)
)
(use-package org-superstar
(use-package org-bullets
:hook
(org-mode . org-superstar-mode)
:config
(setq org-superstar-special-todo-items t)
;; Eliminar los puntitos anteriores a un heading.
(setq org-hide-leading-stars nil)
(setq org-superstar-leading-bullet ?\s)
)
(org-mode . org-bullets-mode))
(use-package visual-fill-column
:config