confi-emacs-actual/configs/base-extensions.el

651 lines
23 KiB
EmacsLisp
Raw Permalink Normal View History

2022-03-30 01:21:13 +02:00
;;; base-extensions.el --- Extenciones/paquetes instalados y su configuración
;; Author: kj <webmaster@outcontrol.net>
;; URL: https://git.kj2.me/kj/confi-emacs-actual
;;; Commentary:
;;; Code:
2022-04-07 05:34:54 +02:00
(setq evil-want-keybinding nil)
2022-03-30 01:21:13 +02:00
;; use-package - No necesita presentación
(use-package use-package
:config
(setq use-package-always-ensure t) ; auto-instalar extenciones que no lo estén
)
;; Auto-actualizar los paquetes
(use-package auto-package-update
:custom
(auto-package-update-interval 7)
(auto-package-update-prompt-before-update t)
(auto-package-update-hide-results t)
:config
(auto-package-update-maybe)
(auto-package-update-at-time "06:00")
:init
(setq
auto-package-update-last-update-day-filename
(expand-file-name ".last-package-update-day" private-dir)))
;; Iconos principalmente para ser usados por neotree
2022-04-05 04:08:30 +02:00
(use-package all-the-icons :defer t)
2022-03-30 01:21:13 +02:00
2022-04-06 08:10:24 +02:00
;; Terminal
2022-04-06 10:14:57 +02:00
(use-package vterm :ensure t :defer t)
;; Multiple vterm
(use-package multi-vterm :ensure t :defer t)
2022-04-06 08:10:24 +02:00
2022-03-30 01:21:13 +02:00
;; Highlight en los números.
(use-package highlight-numbers
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:ensure t
:hook
(prog-mode . highlight-numbers-mode))
2022-04-05 08:19:24 +02:00
;; Mover líneas o regiones
(use-package drag-stuff
:config
(drag-stuff-global-mode 1)
(drag-stuff-define-keys))
2022-03-30 01:21:13 +02:00
;; Recentf - Guarda registro de los archivos abiertos recientemente
(use-package recentf
:config
(setq recentf-save-file
(recentf-expand-file-name (concat temp-dir "/recentf")))
(recentf-mode 1))
;; Guardar la posición del cursor en un archivo para volver allí cuando se lo vuelva a abrir.
(use-package saveplace
:config
(save-place-mode 1)
(setq save-place-file (locate-user-emacs-file (concat temp-dir "/places"))))
;; Emmet - Una ayuda para escribir HTML rápidamente (escribre doc, luego preciona C-j y lo entenderás)
(use-package emmet-mode
:config
(add-hook 'sgml-mode-hook 'emmet-mode) ;; Auto-start on any markup modes
(add-hook 'html-mode-hook 'emmet-mode)
(add-hook 'css-mode-hook 'emmet-mode)
)
;; Modo markdown
2022-04-05 04:08:30 +02:00
(use-package markdown-mode :defer t)
2022-03-30 01:21:13 +02:00
;; Git Gutter - Marca a la izq. si una linea ha sido agregada, editada o eliminada desde el último commit.
(use-package git-gutter
:config
(global-git-gutter-mode +1) ; Habilitar git gutter de manera global
)
;; Mejorando el scroll
(use-package smooth-scrolling
:config
(smooth-scrolling-mode 1) ; Cambia el salto de líneas cuando el cursor llega al final.
(setq mouse-wheel-scroll-amount
'(8 ((shift) . 1) ((control) . nil))) ; Cambia el scroll a 8 líneas a la vez, 1 cuando se preciona SHIFT y saltos de página cuando presionas CTRL
(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
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:custom
(telephone-line-primary-left-separator 'telephone-line-cubed-left)
(telephone-line-secondary-left-separator 'telephone-line-cubed-hollow-left)
(telephone-line-primary-right-separator 'telephone-line-cubed-right)
(telephone-line-secondary-right-separator 'telephone-line-cubed-hollow-right)
(telephone-line-evil-use-short-tag t)
(setq telephone-line-lhs
'((evil . (telephone-line-evil-tag-segment))
(accent . (telephone-line-vc-segment
telephone-line-erc-modified-channels-segment
telephone-line-process-segment))
(nil . (;telephone-line-minor-mode-segment
telephone-line-buffer-segment))))
(setq telephone-line-rhs
'((nil . (telephone-line-misc-info-segment))
(accent . (telephone-line-major-mode-segment))
(evil . (telephone-line-airline-position-segment))))
(telephone-line-mode t)
)
;; Hacer uso de Emacs con las ventajas de vim.
(use-package evil
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:init
(evil-mode 1)
2022-04-07 05:34:54 +02:00
(setq evil-want-keybinding nil)
2022-04-05 04:34:36 +02:00
:config
2022-03-30 01:21:13 +02:00
(setq evil-want-integration t)
(setq evil-want-keybinding nil)
(setq evil-want-C-u-scroll t)
(setq evil-want-C-i-jump nil)
2022-04-05 04:34:36 +02:00
(setq evil-want-fine-undo t)
2022-03-30 01:21:13 +02:00
(setq evil-respect-visual-line-mode t)
(setq evil-toggle-key "C-'") ; Cambiar toggle-key cambiar entre evil states y emacs.
;; (setq evil-default-state 'emacs) ; Modo por defecto en emacs mode
(define-key evil-normal-state-map (kbd "g b") 'evil-jump-backward)
2022-04-05 04:34:36 +02:00
2022-03-30 01:21:13 +02:00
;; Seleccionar todo con C-a en insert mode
(evil-global-set-key 'insert (kbd "C-a") 'mark-whole-buffer)
;; **
;; Atajos personalizados con leader key
;; **
;; Definiendo la leader key
(evil-set-leader 'normal (kbd "SPC"))
(evil-set-leader 'visual (kbd "SPC"))
;; Atajos para counsel-projectile y switch buffer con leader key
(evil-define-key 'normal 'global (kbd "<leader>b") 'ivy-switch-buffer)
(evil-define-key 'visual 'global (kbd "<leader>b") 'ivy-switch-buffer)
(evil-define-key 'normal 'global (kbd "<leader>v") 'counsel-projectile)
(evil-define-key 'normal 'global (kbd "<leader>cp") 'projectile-switch-project)
(evil-define-key 'visual 'global (kbd "<leader>v") 'counsel-projectile)
(evil-define-key 'visual 'global (kbd "<leader>cp") 'projectile-switch-project)
(evil-define-key 'normal 'global (kbd "<leader>ff") 'counsel-find-file)
(evil-define-key 'visual 'global (kbd "<leader>ff") 'counsel-find-file)
;; Atajos windmove con leader key
(evil-define-key 'normal 'global (kbd "<leader>wh") 'windmove-left)
(evil-define-key 'normal 'global (kbd "<leader>wj") 'windmove-down)
(evil-define-key 'normal 'global (kbd "<leader>wk") 'windmove-up)
(evil-define-key 'normal 'global (kbd "<leader>wl") 'windmove-right)
;; Atajos con leader key para frames
(evil-define-key 'normal 'global (kbd "<leader>0") 'delete-window)
(evil-define-key 'normal 'global (kbd "<leader>1") 'delete-other-windows)
(evil-define-key 'normal 'global (kbd "<leader>2") 'split-window-below)
(evil-define-key 'normal 'global (kbd "<leader>3") 'split-window-right)
(evil-define-key 'normal 'global (kbd "<leader>kb") 'kill-buffer)
(evil-define-key 'normal 'global (kbd "<leader>wb") 'winner-undo)
2022-04-05 19:26:36 +02:00
(evil-define-key 'normal 'global (kbd "<leader>wr") 'winner-redo)
;; Atajos para cambiar entre major modes
(evil-define-key 'normal 'global (kbd "<leader>mh") 'html-mode)
(evil-define-key 'normal 'global (kbd "<leader>mj") 'js-mode)
(evil-define-key 'normal 'global (kbd "<leader>mp") 'php-mode)
2022-03-30 01:21:13 +02:00
2022-04-06 08:10:24 +02:00
;; Atajo para abrir vterm
2022-04-06 10:14:57 +02:00
(evil-define-key 'normal 'global (kbd "<leader>tt") 'multi-vterm-dedicated-toggle)
(evil-define-key 'normal 'global (kbd "<leader>tf") 'multi-vterm)
(evil-define-key 'normal 'global (kbd "<leader>tp") 'multi-vterm-project)
2022-04-06 08:10:24 +02:00
2022-03-30 01:21:13 +02:00
;; Cambiar el cursor según el estado
(setq evil-emacs-state-cursor 'bar)
(setq evil-motion-state-cursor 'bar)
(setq evil-normal-state-cursor 'box)
(setq evil-visual-state-cursor 'box)
(setq evil-insert-state-cursor 'bar)
(setq evil-replace-state-cursor 'hollow)
(setq evil-operator-state-cursor 'hollow)
2022-04-05 19:26:36 +02:00
2022-03-30 01:21:13 +02:00
;; Establecer modos por defecto en algunos modos
(evil-set-initial-state 'shell-mode 'insert)
2022-04-06 08:10:24 +02:00
(evil-set-initial-state 'vterm-mode 'emacs)
2022-03-30 01:21:13 +02:00
(evil-set-initial-state 'term-mode 'emacs)
(evil-set-initial-state 'help-mode 'emacs)
(evil-set-initial-state 'helm-grep-mode 'emacs)
(evil-set-initial-state 'grep-mode 'emacs)
(evil-set-initial-state 'dired-mode 'emacs)
(evil-set-initial-state 'Buffer-menu-mode 'emacs)
(evil-set-initial-state 'wdired-mode 'normal)
;; Por defecto usar emcas mode.
;;(setq evil-default-state 'emacs)
)
;; Edición múltiple con evil (Atajos por defecto: C-d y C-D)
(use-package evil-multiedit
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:config
(evil-multiedit-default-keybinds)
)
2022-04-07 04:58:24 +02:00
;; evil keybinding
(use-package evil-collection
:custom (evil-collection-setup-minibuffer t)
:init (evil-collection-init))
2022-04-07 05:34:54 +02:00
;; Barra lateral de archivos
(use-package treemacs
:defer t
:ensure t
:hook (treemacs-mode . (lambda() (display-line-numbers-mode -1)))
:bind ([mouse-1] . treemacs-single-click-expand-action)
:config
(progn
(setq treemacs-collapse-dirs (if treemacs-python-executable 3 0)
treemacs-deferred-git-apply-delay 0.5
treemacs-directory-name-transformer #'identity
treemacs-display-in-side-window t
treemacs-eldoc-display 'simple
treemacs-file-event-delay 5000
treemacs-file-extension-regex treemacs-last-period-regex-value
treemacs-file-follow-delay 0.2
treemacs-file-name-transformer #'identity
treemacs-follow-after-init t
treemacs-expand-after-init t
treemacs-find-workspace-method 'find-for-file-or-pick-first
treemacs-git-command-pipe ""
treemacs-goto-tag-strategy 'refetch-index
treemacs-indentation 2
treemacs-indentation-string " "
treemacs-is-never-other-window nil
treemacs-max-git-entries 5000
treemacs-missing-project-action 'ask
treemacs-move-forward-on-expand nil
treemacs-no-png-images nil
treemacs-no-delete-other-windows t
treemacs-project-follow-cleanup nil
treemacs-persist-file (expand-file-name "cache/treemacs-persist" private-dir)
treemacs-position 'left
treemacs-read-string-input 'from-child-frame
treemacs-recenter-distance 0.1
treemacs-recenter-after-file-follow nil
treemacs-recenter-after-tag-follow nil
treemacs-recenter-after-project-jump 'always
treemacs-recenter-after-project-expand 'on-distance
treemacs-litter-directories '("/node_modules" "/.venv" "/.cask")
treemacs-show-cursor nil
treemacs-show-hidden-files t
treemacs-silent-filewatch nil
treemacs-silent-refresh nil
treemacs-sorting 'alphabetic-asc
treemacs-select-when-already-in-treemacs 'move-back
treemacs-space-between-root-nodes t
treemacs-tag-follow-cleanup t
treemacs-tag-follow-delay 1.5
treemacs-text-scale nil
treemacs-user-mode-line-format nil
treemacs-user-header-line-format nil
treemacs-wide-toggle-width 70
treemacs-width 35
treemacs-width-increment 1
treemacs-width-is-initially-locked t
treemacs-workspace-switch-cleanup nil)
;; The default width and height of the icons is 22 pixels. If you are
;; using a Hi-DPI display, uncomment this to double the icon size.
;;(treemacs-resize-icons 44)
(treemacs-follow-mode t)
(treemacs-filewatch-mode t)
(treemacs-fringe-indicator-mode 'always)
(pcase (cons (not (null (executable-find "git")))
(not (null treemacs-python-executable)))
(`(t . t)
(treemacs-git-mode 'deferred))
(`(t . _)
(treemacs-git-mode 'simple)))
(treemacs-hide-gitignored-files-mode nil))
:bind
(:map global-map
("M-0" . treemacs-select-window)
("C-x t 1" . treemacs-delete-other-windows)
("<f9>" . treemacs)
("<f8>" . treemacs-display-current-project-exclusively)
("<f7>" . treemacs-add-and-display-current-project)
("C-x t d" . treemacs-select-directory)
("C-x t B" . treemacs-bookmark)
("C-x t C-t" . treemacs-find-file)
("C-x t M-t" . treemacs-find-tag)))
(use-package treemacs-evil
:defer t
:after (treemacs evil)
:ensure t
:config
;; Atajos de tecla con leader key de evil-mode.
(evil-set-leader 'treemacs (kbd "SPC"))
(evil-define-key 'treemacs 'global (kbd "<leader>b") 'ivy-switch-buffer)
(evil-define-key 'treemacs 'global (kbd "<leader>v") 'counsel-projectile)
(evil-define-key 'treemacs 'global (kbd "<leader>p") 'counsel-projectile)
(evil-define-key 'treemacs 'global (kbd "<leader>cp") 'treemacs-projectile)
(evil-define-key 'treemacs 'global (kbd "<leader>d") 'treemacs-remove-project-from-workspace))
(use-package treemacs-projectile
:defer t
:after (treemacs projectile)
:ensure t)
(use-package treemacs-icons-dired
:defer t
:hook (dired-mode . treemacs-icons-dired-enable-once)
:ensure t)
(use-package treemacs-persp ;;treemacs-perspective if you use perspective.el vs. persp-mode
:defer t
:after (treemacs persp-mode) ;;or perspective vs. persp-mode
:ensure t
:config (treemacs-set-scope-type 'Perspectives))
(use-package treemacs-tab-bar ;;treemacs-tab-bar if you use tab-bar-mode
:defer t
:after (treemacs)
:ensure t
:config (treemacs-set-scope-type 'Tabs))
2022-03-30 01:21:13 +02:00
;; Code Folding
(use-package origami
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:config
(global-origami-mode))
;; Automcompletado
(use-package company
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:bind (:map company-active-map
("<tab>" . company-indent-or-complete-common)) ; autocompletar con tab como se haría en bash-competition en la terminal de linux
(:map company-active-map
("<escape>" . company-abort)) ; cerrar las sugerencias de autocompletado precionando escape.
:config
(global-company-mode)
(setq company-dabbrev-downcase nil) ; autocompletado case-sensitive.
(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)))
)
;; Poner la info acerca del autocompletado del autocompletado mas rápido
(use-package company-quickhelp
2022-04-06 07:32:38 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:ensure t
:custom
(company-quickhelp-delay 2)
(company-quickhelp-mode))
;; Hacer que el autocompletado se vea más bonito con íconos
(use-package company-box
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:hook (company-mode . company-box-mode))
;; Usar autocompletado con ctags y company
(use-package company-ctags
:config
(add-to-list 'company-backends '(company-ctags))
)
;; Snippets
(use-package yasnippet
2022-04-06 07:32:38 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:ensure t
:custom
(yas-prompt-functions '(yas-completing-prompt))
:config
(yas-reload-all)
:hook
((prog-mode feature-mode) . yas-minor-mode))
;; Restaurar el estado de los frames
(use-package winner
:init
(winner-mode 1))
(use-package lsp-mode
:defer t
2022-04-06 07:32:38 +02:00
:hook (js-mode . lsp-deferred)
2022-03-30 01:21:13 +02:00
:custom
(lsp-headerline-breadcrumb-enable nil))
(use-package lsp-ui)
;; Revisar sintaxis en vivo
(use-package flycheck
;; :diminish flycheck-mode
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:hook (after-init . global-flycheck-mode) ; Habilitar flycheck en todos los modos
)
;; Mostrar los errores de flycheck en un pop up
(use-package flycheck-popup-tip
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:hook (flycheck-mode . flycheck-popup-tip-mode))
;; Un bonito y sencillo panel de inicio
(use-package dashboard
:config
(setq dashboard-set-file-icons t)
(setq dashboard-startup-banner
(expand-file-name "duck-small.png" user-emacs-directory))
(setq dashboard-items '(
;;(recents . 5)
;;(projects . 5)
))
(dashboard-setup-startup-hook)
)
;; Autocompletado para shell scripting.
(use-package company-shell
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:config
(add-to-list 'company-backends '(company-shell company-shell-env company-fish-shell))
)
;; Autocompletado para el minibuffer (counsel e ivy)
(use-package counsel
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:bind
("M-x" . counsel-M-x)
("C-x C-m" . counsel-M-x)
("C-x C-f" . counsel-find-file)
("C-x c k" . counsel-yank-pop))
(use-package projectile
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:diminish projectile-mode
:config
(projectile-mode)
:custom ((projectile-completion-system 'ivy))
:bind-keymap
("C-c p" . projectile-command-map)
:init
;; Rutas de archivos temporales.
(setq projectile-cache-file (expand-file-name "projectile.cache" temp-dir))
(setq projectile-known-projects-file (expand-file-name
"projectile-bookmarks.eld" temp-dir))
;; Carpetas donde tienes tus proyectos (deben tener un archivo .projectile o un repro git iniciado).
(when (file-directory-p "~/Proyectos")
(setq projectile-project-search-path '("~/Proyectos")))
(when (file-directory-p "~/Docker/Nginx")
(setq projectile-project-search-path (append
projectile-project-search-path
'("~/Docker/Nginx"))))
(when (file-directory-p "~/Docker/Nginx2")
(setq projectile-project-search-path (append
projectile-project-search-path
'("~/Docker/Nginx2"))))
(when (file-directory-p "~/Docker/NginxTwitch")
(setq projectile-project-search-path (append
projectile-project-search-path
'("~/Docker/NginxTwitch"))))
(setq projectile-switch-project-action #'projectile-dired) ; Usar dired cuando se elija un proyecto.
;; Cambiar el título de la ventana de emacs
(setq frame-title-format
'(
(:eval
(let ((project-name (projectile-project-name)))
(unless (string= "-" project-name)
(format "[%s] " project-name))))
"%b"
" - Emacs")
)
)
;; Autocompletado de proyectos en counsel (projectile)
(use-package counsel-projectile
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:config
(global-set-key (kbd "C-x v") 'counsel-projectile)
(counsel-projectile-mode))
;; Mostrar info del panel inferior de otra manera
(use-package ivy
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
:bind
("C-x s" . swiper)
("C-x C-r" . ivy-resume)
("C-x b" . ivy-switch-buffer)
:config
(ivy-mode 1)
(setq ivy-use-virtual-buffers nil)
(define-key ivy-minibuffer-map (kbd "TAB") 'ivy-partial)
(define-key read-expression-map (kbd "C-r") 'counsel-expression-history)
(define-key ivy-minibuffer-map (kbd "<escape>") 'minibuffer-keyboard-quit)
)
;; Iconos en Ivy (allthe icons)
(use-package all-the-icons-ivy-rich
:ensure t
:init (all-the-icons-ivy-rich-mode 1)
:config
(setq all-the-icons-ivy-rich-color-icon t))
(use-package ivy-rich
:ensure t
:init (ivy-rich-mode 1))
;; Cuando iniicias un atajo de teclas te muestra las posibilidades
(use-package which-key
:config
(which-key-mode))
;; Autocompletado de parentesis, corchetes, llaves, etc.
(use-package smartparens
:config
(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
2022-04-05 04:08:30 +02:00
:defer t
2022-03-30 01:21:13 +02:00
: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)
)
(provide 'base-extensions)
;;; base-extensions.el ends here