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-05-16 06:13:25 +02:00
|
|
|
;; Iconos principalmente para ser usados por neotree
|
|
|
|
(use-package all-the-icons :defer t)
|
|
|
|
|
|
|
|
;; Iconos en Ivy (allthe icons)
|
|
|
|
(use-package all-the-icons-ivy-rich
|
|
|
|
:defer t
|
|
|
|
:ensure t
|
|
|
|
:init
|
|
|
|
(all-the-icons-ivy-rich-mode 1)
|
|
|
|
:config
|
|
|
|
(setq all-the-icons-ivy-rich-color-icon t))
|
|
|
|
|
|
|
|
;; Reemplazar y buscar mejorado
|
|
|
|
(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))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
|
|
|
;; Auto-actualizar los paquetes
|
|
|
|
(use-package auto-package-update
|
2022-05-04 05:25:07 +02:00
|
|
|
:defer t
|
2022-03-30 01:21:13 +02:00
|
|
|
:custom
|
|
|
|
(auto-package-update-interval 7)
|
|
|
|
(auto-package-update-prompt-before-update t)
|
|
|
|
(auto-package-update-hide-results t)
|
|
|
|
:config
|
|
|
|
(auto-package-update-at-time "06:00")
|
|
|
|
:init
|
|
|
|
(setq
|
|
|
|
auto-package-update-last-update-day-filename
|
2022-05-16 06:13:25 +02:00
|
|
|
(expand-file-name ".last-package-update-day" private-dir))
|
|
|
|
(setq use-package-always-ensure t)
|
|
|
|
(auto-package-update-maybe))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Automcompletado
|
|
|
|
(use-package company
|
|
|
|
:defer t
|
2022-05-18 09:07:05 +02:00
|
|
|
:init
|
2022-05-16 06:13:25 +02:00
|
|
|
(global-company-mode)
|
2022-05-18 09:07:05 +02:00
|
|
|
:config
|
2022-05-16 06:13:25 +02:00
|
|
|
(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.
|
2022-05-18 09:07:05 +02:00
|
|
|
(setq company-backends '((company-capf :with company-yasnippet)
|
|
|
|
(company-files :with company-yasnippet)
|
2022-05-16 06:13:25 +02:00
|
|
|
(company-dabbrev-code company-ctags company-keywords :with company-yasnippet)
|
|
|
|
(company-dabbrev :with company-yasnippet)))
|
|
|
|
)
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Hacer que el autocompletado se vea más bonito con íconos
|
|
|
|
(use-package company-box
|
|
|
|
:defer t
|
|
|
|
:hook (company-mode . company-box-mode))
|
2022-04-06 10:14:57 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Usar autocompletado con ctags y company
|
|
|
|
(use-package company-ctags :defer t)
|
2022-04-06 08:10:24 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Poner la info acerca del autocompletado del autocompletado mas rápido
|
|
|
|
(use-package company-quickhelp
|
2022-04-05 04:08:30 +02:00
|
|
|
:defer t
|
2022-03-30 01:21:13 +02:00
|
|
|
:ensure t
|
2022-05-16 06:13:25 +02:00
|
|
|
:custom
|
|
|
|
(company-quickhelp-delay 2)
|
|
|
|
(company-quickhelp-mode))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Autocompletado para shell scripting.
|
|
|
|
(use-package company-shell
|
2022-05-04 05:25:07 +02:00
|
|
|
:defer t
|
2022-04-05 08:19:24 +02:00
|
|
|
:config
|
2022-05-16 06:13:25 +02:00
|
|
|
(add-to-list 'company-backends '(company-shell company-shell-env company-fish-shell))
|
|
|
|
)
|
2022-04-05 08:19:24 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Autocompletado para el minibuffer (counsel e ivy)
|
|
|
|
(use-package counsel :defer t)
|
|
|
|
|
|
|
|
;; Autocompletado de proyectos en counsel (projectile)
|
|
|
|
(use-package counsel-projectile
|
2022-05-04 05:25:07 +02:00
|
|
|
:defer t
|
2022-03-30 01:21:13 +02:00
|
|
|
:config
|
2022-05-16 06:13:25 +02:00
|
|
|
(counsel-projectile-mode))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Un bonito y sencillo panel de inicio
|
|
|
|
(use-package dashboard
|
2022-05-04 05:25:07 +02:00
|
|
|
:defer t
|
2022-05-16 06:13:25 +02:00
|
|
|
:init
|
|
|
|
(dashboard-setup-startup-hook)
|
2022-03-30 01:21:13 +02:00
|
|
|
:config
|
2022-05-16 06:13:25 +02:00
|
|
|
(setq dashboard-set-file-icons t)
|
|
|
|
(setq dashboard-set-heading-icons t)
|
|
|
|
(setq dashboard-set-file-icons t)
|
|
|
|
(setq dashboard-startup-banner
|
|
|
|
(expand-file-name "duck-small.png" user-emacs-directory))
|
|
|
|
(setq dashboard-items '(
|
|
|
|
(agenda . 10)
|
|
|
|
;;(recents . 10)
|
|
|
|
))
|
|
|
|
)
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Mover líneas o regiones
|
|
|
|
(use-package drag-stuff
|
2022-05-04 05:25:07 +02:00
|
|
|
:defer t
|
2022-05-16 06:13:25 +02:00
|
|
|
:init
|
|
|
|
(drag-stuff-global-mode 1)
|
2022-03-30 01:21:13 +02:00
|
|
|
:config
|
2022-05-16 06:13:25 +02:00
|
|
|
(drag-stuff-define-keys))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; La línea bonita esa de abajo
|
2022-04-21 19:45:31 +02:00
|
|
|
(use-package doom-modeline
|
2022-05-04 05:25:07 +02:00
|
|
|
:defer t
|
2022-04-21 19:45:31 +02:00
|
|
|
: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
|
2022-05-16 06:13:25 +02:00
|
|
|
doom-modeline-persp-name t))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Emmet - Una ayuda para escribir HTML rápidamente (escribre doc, luego preciona C-j y lo entenderás)
|
|
|
|
(use-package emmet-mode
|
|
|
|
:defer t
|
|
|
|
:hook (html-mode . emmet-mode))
|
2022-04-21 19:45:31 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Revisar sintaxis en vivo
|
|
|
|
(use-package flycheck
|
|
|
|
;; :diminish flycheck-mode
|
2022-04-05 04:08:30 +02:00
|
|
|
:defer t
|
2022-05-16 06:13:25 +02:00
|
|
|
:hook (after-init . global-flycheck-mode) ; Habilitar flycheck en todos los modos
|
2022-03-30 01:21:13 +02:00
|
|
|
)
|
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Mostrar los errores de flycheck en un pop up
|
|
|
|
(use-package flycheck-popup-tip
|
2022-04-06 07:32:38 +02:00
|
|
|
:defer t
|
2022-05-16 06:13:25 +02:00
|
|
|
:hook (flycheck-mode . flycheck-popup-tip-mode))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +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
|
2022-04-05 04:08:30 +02:00
|
|
|
:defer t
|
2022-05-16 06:13:25 +02:00
|
|
|
:init
|
|
|
|
(global-git-gutter-mode +1))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Highlight en los números.
|
|
|
|
(use-package highlight-numbers
|
2022-04-06 07:32:38 +02:00
|
|
|
:defer t
|
2022-03-30 01:21:13 +02:00
|
|
|
:ensure t
|
|
|
|
:hook
|
2022-05-16 06:13:25 +02:00
|
|
|
(prog-mode . highlight-numbers-mode))
|
2022-05-06 22:07:54 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Mostrar info del panel inferior de otra manera
|
|
|
|
(use-package ivy
|
|
|
|
:defer t
|
|
|
|
:config
|
|
|
|
(ivy-mode 1)
|
|
|
|
(setq ivy-use-virtual-buffers nil)
|
|
|
|
)
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
(use-package ivy-rich
|
2022-05-04 05:25:07 +02:00
|
|
|
:defer t
|
2022-05-16 06:13:25 +02:00
|
|
|
:ensure t
|
|
|
|
:config
|
|
|
|
(ivy-rich-mode 1))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Languaje server protocol
|
2022-03-30 01:21:13 +02:00
|
|
|
(use-package lsp-mode
|
|
|
|
:defer t
|
|
|
|
:custom
|
2022-05-18 09:07:05 +02:00
|
|
|
(lsp-headerline-breadcrumb-enable nil)
|
|
|
|
:config
|
|
|
|
(setq lsp-completion-provider :none))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Interface para lsp
|
2022-05-04 05:25:07 +02:00
|
|
|
(use-package lsp-ui :defer t)
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Magia para git
|
|
|
|
(use-package magit :defer t)
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Modo markdown
|
|
|
|
(use-package markdown-mode :defer t)
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Multiple vterm
|
|
|
|
(use-package multi-vterm :ensure t :defer t)
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Code Folding
|
|
|
|
(use-package origami
|
2022-04-05 04:08:30 +02:00
|
|
|
:defer t
|
2022-05-16 06:13:25 +02:00
|
|
|
:init
|
|
|
|
(global-origami-mode))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Paquete para manejo de proyectos
|
2022-03-30 01:21:13 +02:00
|
|
|
(use-package projectile
|
2022-05-04 05:25:07 +02:00
|
|
|
:defer t
|
2022-03-30 01:21:13 +02:00
|
|
|
:diminish projectile-mode
|
|
|
|
:config
|
|
|
|
(projectile-mode)
|
|
|
|
:custom ((projectile-completion-system 'ivy))
|
|
|
|
: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")))
|
2022-05-04 05:25:07 +02:00
|
|
|
(when (file-directory-p "~/mnt/Nginx")
|
2022-03-30 01:21:13 +02:00
|
|
|
(setq projectile-project-search-path (append
|
|
|
|
projectile-project-search-path
|
2022-05-04 05:25:07 +02:00
|
|
|
'("~/mnt/Nginx"))))
|
2022-03-30 01:21:13 +02:00
|
|
|
(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")
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Recentf - Guarda registro de los archivos abiertos recientemente
|
|
|
|
(use-package recentf
|
2022-05-04 05:25:07 +02:00
|
|
|
:defer t
|
2022-03-30 01:21:13 +02:00
|
|
|
:config
|
2022-05-16 06:13:25 +02:00
|
|
|
(setq recentf-save-file
|
|
|
|
(recentf-expand-file-name (concat temp-dir "/recentf")))
|
|
|
|
(recentf-mode 1))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Guardar la posición del cursor en un archivo para volver allí cuando se lo vuelva a abrir.
|
|
|
|
(use-package saveplace
|
2022-04-05 04:08:30 +02:00
|
|
|
:defer t
|
2022-05-16 06:13:25 +02:00
|
|
|
:init
|
|
|
|
(save-place-mode 1)
|
2022-03-30 01:21:13 +02:00
|
|
|
:config
|
2022-05-16 06:13:25 +02:00
|
|
|
(setq save-place-file (locate-user-emacs-file (concat temp-dir "/places"))))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Autocompletado de parentesis, corchetes, llaves, etc.
|
|
|
|
(use-package smartparens
|
2022-05-04 05:25:07 +02:00
|
|
|
:defer t
|
2022-05-16 06:13:25 +02:00
|
|
|
:init
|
|
|
|
(smartparens-global-mode t))
|
|
|
|
|
|
|
|
;; Mejorando el scroll
|
|
|
|
(use-package smooth-scrolling
|
|
|
|
:defer t
|
|
|
|
:init
|
|
|
|
(smooth-scrolling-mode 1)
|
2022-03-30 01:21:13 +02:00
|
|
|
:config
|
2022-05-16 06:13:25 +02:00
|
|
|
(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)
|
|
|
|
)
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; use-package - No necesita presentación
|
|
|
|
(use-package use-package :defer t)
|
|
|
|
|
|
|
|
;; Terminal
|
|
|
|
(use-package vterm :ensure t :defer t)
|
2022-03-30 01:21:13 +02:00
|
|
|
|
|
|
|
;; Cuando iniicias un atajo de teclas te muestra las posibilidades
|
2022-05-16 06:13:25 +02:00
|
|
|
(use-package which-key
|
|
|
|
:defer t
|
|
|
|
:init
|
|
|
|
(which-key-mode))
|
2022-03-30 01:21:13 +02:00
|
|
|
|
2022-05-16 06:13:25 +02:00
|
|
|
;; Restaurar el estado de los frames
|
|
|
|
(use-package winner
|
|
|
|
:defer t
|
|
|
|
:init
|
|
|
|
(winner-mode 1))
|
2022-05-04 05:25:07 +02:00
|
|
|
|
2022-05-18 09:07:05 +02:00
|
|
|
;; Permitir snippets
|
2022-05-16 06:13:25 +02:00
|
|
|
(use-package yasnippet
|
|
|
|
:defer t
|
|
|
|
:ensure t
|
|
|
|
:custom
|
|
|
|
(yas-prompt-functions '(yas-completing-prompt))
|
|
|
|
:config
|
|
|
|
(yas-reload-all)
|
|
|
|
:hook
|
|
|
|
((prog-mode feature-mode) . yas-minor-mode-on)
|
|
|
|
(html-mode . yas-minor-mode))
|
|
|
|
|
2022-05-18 09:07:05 +02:00
|
|
|
;; Coleción de snippets
|
2022-05-16 06:13:25 +02:00
|
|
|
(use-package yasnippet-snippets :ensure t :defer t)
|
2022-05-04 05:25:07 +02:00
|
|
|
|
2022-03-30 01:21:13 +02:00
|
|
|
;; Org-Mode
|
2022-04-21 19:45:31 +02:00
|
|
|
(require 'org-config)
|
2022-03-30 01:21:13 +02:00
|
|
|
|
|
|
|
(provide 'base-extensions)
|
|
|
|
;;; base-extensions.el ends here
|