Move org config to 'org-config.el' file.

This commit is contained in:
kj 2022-04-21 13:45:31 -04:00
parent 9125667700
commit 5536818ec3
4 changed files with 132 additions and 136 deletions

View File

@ -89,21 +89,17 @@
(setq mouse-wheel-progressive-speed nil) ; Deshabilita la velocidad progresiva del scroll (mientras más scroll haces, mas rápido va)
)
;; Esa línea bonita de abajo del editor que dice cosas xD
(use-package telephone-line
:custom
(setq telephone-line-lhs
'((accent . (telephone-line-vc-segment
telephone-line-erc-modified-channels-segment
telephone-line-process-segment))
(nil . (telephone-line-buffer-segment))))
(setq telephone-line-rhs
'((nil . (telephone-line-misc-info-segment))
(accent . (telephone-line-major-mode-segment))
(nil . (telephone-line-airline-position-segment))))
(telephone-line-mode t)
)
(use-package doom-modeline
:ensure t
:init (doom-modeline-mode 1)
:config
(setq doom-modeline-project-detection 'auto
doom-modeline-buffer-file-name-style 'relative-from-project
doom-modeline-major-mode-color-icon t
doom-modeline-buffer-modification-icon t
doom-modeline-indent-info nil
doom-modeline-persp-name t)
)
;; Code Folding
(use-package origami
@ -111,6 +107,14 @@
:config
(global-origami-mode))
;; Reemplazar y buscar menjorado
(use-package anzu
:ensure t
:config
(global-anzu-mode +1)
(global-set-key [remap query-replace] 'anzu-query-replace)
(global-set-key [remap query-replace-regexp] 'anzu-query-replace-regexp))
;; Automcompletado
(use-package company
:defer t
@ -124,9 +128,9 @@
(setq company-idle-delay 0) ; mostrar autocompletado lo más rápido posible
(setq company-minimum-prefix-length 1) ; mostrar autocompletado desde que se coloca la primera letra.
(setq company-backends '((company-files :with company-yasnippet)
(company-capf :with company-yasnippet)
(company-dabbrev-code company-gtags company-etags company-keywords :with company-yasnippet)
(company-dabbrev :with company-yasnippet)))
(company-capf :with company-yasnippet)
(company-dabbrev-code company-gtags company-etags company-keywords :with company-yasnippet)
(company-dabbrev :with company-yasnippet)))
)
;; Poner la info acerca del autocompletado del autocompletado mas rápido
@ -296,124 +300,7 @@
(smartparens-global-mode t))
;; Org-Mode
(defun efs/org-font-setup ()
"ORG font faces setup."
;; Set faces for heading levels
(dolist (face '((org-level-1 . 1.2)
(org-level-2 . 1.1)
(org-level-3 . 1.05)
(org-level-4 . 1.0)
(org-level-5 . 1.1)
(org-level-6 . 1.1)
(org-level-7 . 1.1)
(org-level-8 . 1.1)))
(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-table nil :inherit 'fixed-pitch)
(set-face-attribute 'org-formula 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)
(set-face-attribute 'line-number nil :inherit 'fixed-pitch)
(set-face-attribute 'line-number-current-line nil :inherit 'fixed-pitch))
(defun efs/org-mode-setup ()
"Set some configs on 'org-mode'."
(display-line-numbers-mode 0)
(org-indent-mode)
(variable-pitch-mode 1)
(visual-line-mode 1)
(setq evil-auto-indent nil)
)
(use-package org
:defer t
:pin org
:hook (org-mode . efs/org-mode-setup)
:config
(setq org-ellipsis "")
(setq org-hide-emphasis-markers t)
(setq org-agenda-start-with-log-mode t)
(setq org-log-done 'time)
(setq org-log-into-drawer t)
;; Palabras claves del To Do de org-mode
(setq org-todo-keywords
;;'((sequence "☐" "✔" "⌛" "❌")))
'((sequence "TODO(t)" "DOING(n)" "WAITING(w)" "|" "DONE(d!)" "CANCELED(c!)")))
(setq org-todo-keyword-faces
'(("TODO" . "#ff6464")
("DOING" . "yellow")
("DONE" . "green")
("WAITING" . "orange")
("CANCELED" . "#aaa"))
)
;; Archivos a usarse en org-agenda
(setq org-agenda-files
'("~/Proyectos/ORGenda/Ideas.org"
"~/Proyectos/ORGenda/IdeasTwitch.org"
"~/Proyectos/ORGenda/Proyectos.org"
"~/Proyectos/ORGenda/Tareas.org")
)
;; Archivos entre los que se moverán las tareas
(setq org-refile-targets
'(("Archivo.org" :maxlevel . 1)
("Proyectos.org" :maxlevel . 1)
("IdeasTwitch.org" :maxlevel . 1)
("Ideas.org" :maxlevel . 1)
("Tareas.org" :maxlevel . 1)))
;; Guardar los archivos cuando se muevan tareas entre ellos
(advice-add 'org-refile :after 'org-save-all-org-buffers)
(setq org-capture-templates
`(("t" "Tareas / Projectos")
("tt" "Tareas" entry (file+olp "~/Proyectos/ORGenda/Tareas.org")
"* TODO %?\n %U\n %a\n %i" :empty-lines 1)
("tp" "Proyectos" entry (file+olp "~/Proyectos/ORGenda/Proyectos.org")
"* TODO %?\n %U\n %a\n %i" :empty-lines 1)
("i" "Ideas")
("ii" "Ideas General" entry
(file+olp "~/Proyectos/ORGenda/ideas.org")
"* TODO %?\n %a\n %i" :empty-lines 1)
("it" "Ideas Twitch" entry
(file+olp "~/Proyectos/ORGenda/IdeasTwitch.org")
"* TODO %?\n %a\n %i" :empty-lines 1)
)
)
(efs/org-font-setup))
(use-package org-superstar
:hook
(org-mode . org-superstar-mode)
:config
(setq org-superstar-special-todo-items t)
)
(defun efs/org-mode-visual-fill ()
"Visual mode fill columns."
(visual-fill-column-mode 1))
(use-package visual-fill-column
:hook (org-mode . efs/org-mode-visual-fill)
:config
;; Tamaño de la columna
(setq visual-fill-column-width 150)
;; Centrar el texto
(setq-default visual-fill-column-center-text t)
)
(require 'org-config)
(provide 'base-extensions)
;;; base-extensions.el ends here

View File

@ -43,5 +43,9 @@
(global-set-key (kbd "C-x C-<up>") 'windmove-up)
(global-set-key (kbd "C-x C-<down>") 'windmove-down)
;; Atajos para reemplazar (los por fedecto no van bien para el teclado en español)
(global-set-key (kbd "C-x /") 'query-replace-regexp)
(global-set-key (kbd "M-/") 'query-replace)
(provide 'base-keys)
;;; base-keys.el ends here

View File

@ -100,6 +100,7 @@
;; Configuración cuando es un server
(defun setup-daemon ()
"Carga la configuración del modo daemon."
(message "Corriendo en modo daemon.")
(set-face-attribute 'default nil :font "Fira Code Retina" :height 112)

104
configs/org-config.el Normal file
View File

@ -0,0 +1,104 @@
;;; org-config.el --- Configuración de org-mode
;; Author: kj <webmaster@outcontrol.net>
;; URL: https://git.kj2.me/kj/confi-emacs-actual
;;; Commentary:
;;; 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
(set-face-attribute (car face) nil :font "Cantarell" :weight 'regular :height (cdr face))
)
(use-package org
:defer t
:pin org
:hook
(org-mode . kj/org-hook)
:config
(setq org-ellipsis "")
(setq org-hide-emphasis-markers t)
(setq org-startup-folded 'content)
(setq org-agenda-start-with-log-mode t)
(setq org-log-done 'time)
(setq org-log-into-drawer t)
(setq org-cycle-separator-lines -1)
(org-indent-mode)
;; Palabras claves del To Do de org-mode
(setq org-todo-keywords
;;'((sequence "☐" "✔" "⌛" "❌")))
'((sequence "TODO(t)" "DOING(n)" "WAITING(w)" "|" "DONE(d!)" "CANCELED(c!)")))
(setq org-todo-keyword-faces
'(("TODO" . "#ff6464")
("DOING" . "yellow")
("DONE" . "green")
("WAITING" . "orange")
("CANCELED" . "#aaa"))
)
;; Archivos a usarse en org-agenda
(setq org-agenda-files
'("~/Proyectos/ORGenda/Ideas.org"
"~/Proyectos/ORGenda/IdeasTwitch.org"
"~/Proyectos/ORGenda/Proyectos.org"
"~/Proyectos/ORGenda/Tareas.org")
)
;; Archivos entre los que se moverán las tareas
(setq org-refile-targets
'(("Archivo.org" :maxlevel . 1)
("Proyectos.org" :maxlevel . 1)
("IdeasTwitch.org" :maxlevel . 1)
("Ideas.org" :maxlevel . 1)
("Tareas.org" :maxlevel . 1)))
;; Guardar los archivos cuando se muevan tareas entre ellos
(advice-add 'org-refile :after 'org-save-all-org-buffers)
(setq org-capture-templates
`(("t" "Tareas / Projectos")
("tt" "Tareas" entry (file+olp "~/Proyectos/ORGenda/Tareas.org")
"* TODO %?\n %U\n %a\n %i" :empty-lines 1)
("tp" "Proyectos" entry (file+olp "~/Proyectos/ORGenda/Proyectos.org")
"* TODO %?\n %U\n %a\n %i" :empty-lines 1)
("i" "Ideas")
("ii" "Ideas General" entry
(file+olp "~/Proyectos/ORGenda/ideas.org")
"* TODO %?\n %a\n %i" :empty-lines 1)
("it" "Ideas Twitch" entry
(file+olp "~/Proyectos/ORGenda/IdeasTwitch.org")
"* TODO %?\n %a\n %i" :empty-lines 1)
)
)
)
(use-package org-superstar
: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)
)
(use-package visual-fill-column
:config
;; Tamaño de la columna
(setq visual-fill-column-width 150)
;; Centrar el texto
(setq-default visual-fill-column-center-text t)
)
(provide 'org-config)
;;; org-config.el ends here