Compare commits
	
		
			141 Commits
		
	
	
		
			evil
			...
			3b73728c41
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 3b73728c41 | |||
| 5ad90cc437 | |||
| 61e9b7d89d | |||
| b0abc9d6cf | |||
| 0d84b2d066 | |||
| 6ba69a8dcc | |||
| e747f0d61e | |||
| 6d0b0a6abc | |||
| 4f90e837eb | |||
| 16aab9416c | |||
| 5526684a4b | |||
| 97519e6920 | |||
| 1475a86c75 | |||
| 75cf33384c | |||
| 575db84bb4 | |||
| 07097201dd | |||
| 5c4fe71b09 | |||
| 8743e40381 | |||
| 92e3f98271 | |||
| c01fb4f69c | |||
| 0a23b5b19d | |||
| bd450ea034 | |||
| e1775bda51 | |||
| 69c904cffa | |||
| a6848f631f | |||
| 92ac29ee5d | |||
| 76e9e4062c | |||
| 003dd5db24 | |||
| 156c544f73 | |||
| 900e6d181b | |||
| 38d53dc5c1 | |||
| 816a2188af | |||
| 4d0fe6e385 | |||
| 1ec4cd79eb | |||
| 14ecdc2269 | |||
| 099ddda6db | |||
| f0ba1006e5 | |||
| 330063d212 | |||
| d683d3cbf7 | |||
| 017566a9dd | |||
| a7c0b5de66 | |||
| 42e325db91 | |||
| f696234932 | |||
| c81fc52b8c | |||
| c4c8b98c93 | |||
| d74f9db1fe | |||
| db3aeec98e | |||
| 918396efc6 | |||
| dc74b4bde0 | |||
| 52db45d968 | |||
| 8f90cfcf1b | |||
| a86d9e4eb7 | |||
| 5cf22a5451 | |||
| 2d02d9e5bc | |||
| 051e902d64 | |||
| c6d8b14feb | |||
| 42d34290e2 | |||
| f19c62f75a | |||
| 33fa8c56d8 | |||
| 4d47c23808 | |||
| 284a01cabc | |||
| 83f311024a | |||
| cddf20683e | |||
| 8d430b9d3c | |||
| 3f7fc4ec29 | |||
| 5a2f94bc32 | |||
| ef6bbf94f7 | |||
| b5de8f34b3 | |||
| adb2034d24 | |||
| 492571645b | |||
| be00c17615 | |||
| a6c1c113df | |||
| 23b14da665 | |||
| fb41d46922 | |||
| 9ee088a832 | |||
| a27d677716 | |||
| cf059895f9 | |||
| 5fa858af78 | |||
| ee4c9c351f | |||
| d8f91e3dac | |||
| 88c8049a6f | |||
| cf49ec2618 | |||
| 4aa5217915 | |||
| eea36dbe80 | |||
| fe46f716eb | |||
| cea7e3ace6 | |||
| e6e6c20c9c | |||
| 787e23525c | |||
| 5a889964e7 | |||
| b7873f48de | |||
| 93bee419e8 | |||
| b59e654bbd | |||
| d50f434788 | |||
| ac79a60aee | |||
| cb445f95c0 | |||
| 6dbf0e9746 | |||
| f8b5174274 | |||
| 553694530e | |||
| 42ff8f3cbd | |||
| 8fa7bc9ed7 | |||
| f38ca8a4c9 | |||
| a7045d3b30 | |||
| 7ee9bd4492 | |||
| fb890c4ceb | |||
| 98174ef392 | |||
| 2baff92bf0 | |||
| 52a7058da6 | |||
| 290243835f | |||
| f75b9eda35 | |||
| e98d12e7e8 | |||
| 0411b624da | |||
| 97ec0558dd | |||
| cfb3279f52 | |||
| 1ade083d25 | |||
| 18a43a404c | |||
| f654c2889b | |||
| 28e1e3d4b1 | |||
| 935cb9e70b | |||
| 97c7ea774b | |||
| 87c61ac6e9 | |||
| e7750197c9 | |||
| 19750d202d | |||
| 9166630294 | |||
| d1c00e505c | |||
| 9cddf59c1d | |||
| 0aed1d01a2 | |||
| d39a050a04 | |||
| 38b36468f8 | |||
| aced36ad35 | |||
| 7b0757f128 | |||
| 0522d5085f | |||
| 0e48c679ef | |||
| fe386ce0d8 | |||
| 25e4d3ec05 | |||
| 52f8c664e6 | |||
| b4e1c001ab | |||
| 1678f7b283 | |||
| 5536818ec3 | |||
| 9125667700 | |||
| 6598b63079 | |||
| b7bd232410 | 
							
								
								
									
										22
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										22
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -1,8 +1,24 @@
 | 
				
			|||||||
elpa
 | 
					elpa
 | 
				
			||||||
transient
 | 
					transient
 | 
				
			||||||
eln-cache
 | 
					eln-cache
 | 
				
			||||||
private/.*
 | 
					private/
 | 
				
			||||||
private/cache
 | 
					 | 
				
			||||||
bookmarks
 | 
					bookmarks
 | 
				
			||||||
.lsp-session-v1
 | 
					.lsp-session*
 | 
				
			||||||
projectile-bookmarks.eld
 | 
					projectile-bookmarks.eld
 | 
				
			||||||
 | 
					.org-id-locations
 | 
				
			||||||
 | 
					org-roam.db
 | 
				
			||||||
 | 
					lsp-cache/
 | 
				
			||||||
 | 
					.cache/
 | 
				
			||||||
 | 
					url/
 | 
				
			||||||
 | 
					straight/
 | 
				
			||||||
 | 
					amx-items
 | 
				
			||||||
 | 
					projects
 | 
				
			||||||
 | 
					speed-type/
 | 
				
			||||||
 | 
					var/
 | 
				
			||||||
 | 
					.dap-breakpoints
 | 
				
			||||||
 | 
					eclipse.jdt.ls/
 | 
				
			||||||
 | 
					workspace/
 | 
				
			||||||
 | 
					/.extension/
 | 
				
			||||||
 | 
					/diary
 | 
				
			||||||
 | 
					/history
 | 
				
			||||||
 | 
					/projectile.cache
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,650 +0,0 @@
 | 
				
			|||||||
;;; 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:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(setq evil-want-keybinding nil)
 | 
					 | 
				
			||||||
;; 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
 | 
					 | 
				
			||||||
(use-package all-the-icons :defer t)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Terminal
 | 
					 | 
				
			||||||
(use-package vterm :ensure t :defer t)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Multiple vterm
 | 
					 | 
				
			||||||
(use-package multi-vterm :ensure t :defer t)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Highlight en los números.
 | 
					 | 
				
			||||||
(use-package highlight-numbers
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :ensure t
 | 
					 | 
				
			||||||
  :hook
 | 
					 | 
				
			||||||
  (prog-mode . highlight-numbers-mode))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Mover líneas o regiones
 | 
					 | 
				
			||||||
(use-package drag-stuff
 | 
					 | 
				
			||||||
  :config
 | 
					 | 
				
			||||||
  (drag-stuff-global-mode 1)
 | 
					 | 
				
			||||||
  (drag-stuff-define-keys))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; 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
 | 
					 | 
				
			||||||
(use-package markdown-mode :defer t)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; 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
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :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
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :init
 | 
					 | 
				
			||||||
  (evil-mode 1)
 | 
					 | 
				
			||||||
  (setq evil-want-keybinding nil)
 | 
					 | 
				
			||||||
  :config
 | 
					 | 
				
			||||||
  (setq evil-want-integration t)
 | 
					 | 
				
			||||||
  (setq evil-want-keybinding nil)
 | 
					 | 
				
			||||||
  (setq evil-want-C-u-scroll t)
 | 
					 | 
				
			||||||
  (setq evil-want-C-i-jump nil)
 | 
					 | 
				
			||||||
  (setq evil-want-fine-undo t)
 | 
					 | 
				
			||||||
  (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)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  ;; 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)
 | 
					 | 
				
			||||||
  (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)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  ;; Atajo para abrir vterm
 | 
					 | 
				
			||||||
  (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)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  ;; 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)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  ;; Establecer modos por defecto en algunos modos
 | 
					 | 
				
			||||||
  (evil-set-initial-state 'shell-mode 'insert)
 | 
					 | 
				
			||||||
  (evil-set-initial-state 'vterm-mode 'emacs)
 | 
					 | 
				
			||||||
  (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
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :config
 | 
					 | 
				
			||||||
  (evil-multiedit-default-keybinds)
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; evil keybinding
 | 
					 | 
				
			||||||
(use-package evil-collection
 | 
					 | 
				
			||||||
  :custom (evil-collection-setup-minibuffer t)
 | 
					 | 
				
			||||||
  :init (evil-collection-init))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; 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))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Code Folding
 | 
					 | 
				
			||||||
(use-package origami
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :config
 | 
					 | 
				
			||||||
  (global-origami-mode))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Automcompletado
 | 
					 | 
				
			||||||
(use-package company
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :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
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :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
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :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
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :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
 | 
					 | 
				
			||||||
  :hook (js-mode . lsp-deferred)
 | 
					 | 
				
			||||||
  :custom
 | 
					 | 
				
			||||||
  (lsp-headerline-breadcrumb-enable nil))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(use-package lsp-ui)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Revisar sintaxis en vivo
 | 
					 | 
				
			||||||
(use-package flycheck
 | 
					 | 
				
			||||||
  ;; :diminish flycheck-mode
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :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
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :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
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :config
 | 
					 | 
				
			||||||
  (add-to-list 'company-backends '(company-shell company-shell-env company-fish-shell))
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Autocompletado para el minibuffer (counsel e ivy)
 | 
					 | 
				
			||||||
(use-package counsel
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :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
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :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
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :config
 | 
					 | 
				
			||||||
  (global-set-key (kbd "C-x v") 'counsel-projectile)
 | 
					 | 
				
			||||||
  (counsel-projectile-mode))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Mostrar info del panel inferior de otra manera
 | 
					 | 
				
			||||||
(use-package ivy
 | 
					 | 
				
			||||||
  :defer t
 | 
					 | 
				
			||||||
  :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
 | 
					 | 
				
			||||||
  :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)
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(provide 'base-extensions)
 | 
					 | 
				
			||||||
;;; base-extensions.el ends here
 | 
					 | 
				
			||||||
@@ -1,46 +0,0 @@
 | 
				
			|||||||
(provide 'base-functions)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Buscar el texto actualmente seleccionado
 | 
					 | 
				
			||||||
(defun kj-isearch-with-region ()
 | 
					 | 
				
			||||||
  "Use region as the isearch text."
 | 
					 | 
				
			||||||
  (when mark-active
 | 
					 | 
				
			||||||
    (let ((region (funcall region-extract-function nil)))
 | 
					 | 
				
			||||||
      (deactivate-mark)
 | 
					 | 
				
			||||||
      (isearch-push-state)
 | 
					 | 
				
			||||||
      (isearch-yank-string region))))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(add-hook 'isearch-mode-hook #'kj-isearch-with-region)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Borrar espacios, tabs y saltos de línea innecesarios al guardar
 | 
					 | 
				
			||||||
(add-hook 'before-save-hook 'delete-trailing-whitespace)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Generar archivo TAGS
 | 
					 | 
				
			||||||
(defun create-tags (dir-name)
 | 
					 | 
				
			||||||
  "Create tags file."
 | 
					 | 
				
			||||||
  (interactive "DDirectory: ")
 | 
					 | 
				
			||||||
  (shell-command
 | 
					 | 
				
			||||||
   (format "cd '%s' && ctags -f TAGS -e -R --exclude=*.min.js"
 | 
					 | 
				
			||||||
           (directory-file-name (file-truename dir-name))
 | 
					 | 
				
			||||||
           )
 | 
					 | 
				
			||||||
   )
 | 
					 | 
				
			||||||
  (message "Archivo TAGS generado.")
 | 
					 | 
				
			||||||
  )
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Hacer emacs transparente (no funciona perfecto, pero sirve)
 | 
					 | 
				
			||||||
(defun toggle-transparency ()
 | 
					 | 
				
			||||||
  (interactive)
 | 
					 | 
				
			||||||
  (let ((alpha (frame-parameter nil 'alpha)))
 | 
					 | 
				
			||||||
    (set-frame-parameter
 | 
					 | 
				
			||||||
     nil 'alpha
 | 
					 | 
				
			||||||
     (if (eql (cond ((numberp alpha) alpha)
 | 
					 | 
				
			||||||
                    ((numberp (cdr alpha)) (cdr alpha))
 | 
					 | 
				
			||||||
                    ;; Also handle undocumented (<active> <inactive>) form.
 | 
					 | 
				
			||||||
                    ((numberp (cadr alpha)) (cadr alpha)))
 | 
					 | 
				
			||||||
              100)
 | 
					 | 
				
			||||||
         '(60 . 60) '(100 . 100)))))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun transparency (value)
 | 
					 | 
				
			||||||
  "Sets the transparency of the frame window. 0=transparent/100=opaque"
 | 
					 | 
				
			||||||
  (interactive "nTransparency Value 0 - 100 opaque:")
 | 
					 | 
				
			||||||
  (set-frame-parameter (selected-frame) 'alpha value))
 | 
					 | 
				
			||||||
@@ -1,29 +0,0 @@
 | 
				
			|||||||
;;; base-keys.el --- Archivo de configuración de atajos
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Author: kj <webmaster@outcontrol.net>
 | 
					 | 
				
			||||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;;; Commentary:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Aquí se configuran los atajos globales.
 | 
					 | 
				
			||||||
;; Es posible que haya otros, ya que muchos se configuran
 | 
					 | 
				
			||||||
;; directamente en los paquetes/extensiones y dependen de los mismos.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;;; Code:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(define-key minibuffer-local-map  (kbd "<escape>")
 | 
					 | 
				
			||||||
  'keyboard-escape-quit)                                  ; Cancelar el minibuffer con un solo ESC.
 | 
					 | 
				
			||||||
(global-set-key (kbd "C-x C-z") nil)                      ; Unbind C-x C-z (don't minimize)
 | 
					 | 
				
			||||||
(global-set-key (kbd "C-a") 'mark-whole-buffer)           ; Seleccionar todo con CTRL+A.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(global-set-key (kbd "M-c") 'comment-or-uncomment-region) ; Comentar/descomentar en lote
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(global-set-key (kbd "C-<f6>") 'create-tags)              ; Generar o Regeneral el archivo TAGS
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(global-set-key (kbd "C-<f11>") 'toggle-frame-maximized)  ; Maximizar / restaurar
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(global-set-key (kbd "C-c a") 'org-agenda)                ; Abrir la agenda.
 | 
					 | 
				
			||||||
(global-set-key (kbd "C-c c") 'org-capture)               ; Abrir la crear una entrada.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(provide 'base-keys)
 | 
					 | 
				
			||||||
;;; base-keys.el ends here
 | 
					 | 
				
			||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
;;; base.el --- Configuración base de emacs
 | 
					;;; init-base.el --- Configuración base de emacs	-*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Author: kj <webmaster@outcontrol.net>
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
@@ -10,46 +10,57 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
;;; Code:
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; The default is 800 kilobytes.  Measured in bytes.
 | 
					 | 
				
			||||||
(setq gc-cons-threshold (* 50 1000 1000))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Native compilation
 | 
					;; Native compilation
 | 
				
			||||||
(when (and (fboundp 'native-comp-available-p)
 | 
					(when (and (fboundp 'native-comp-available-p)
 | 
				
			||||||
           (native-comp-available-p))
 | 
					           (native-comp-available-p))
 | 
				
			||||||
  (progn
 | 
					  (progn
 | 
				
			||||||
    (setq native-comp-async-report-warnings-errors nil)
 | 
					    (setq native-comp-async-report-warnings-errors nil)
 | 
				
			||||||
    (setq comp-deferred-compilation t)
 | 
					    (setq comp-deferred-compilation t)
 | 
				
			||||||
    (add-to-list 'native-comp-eln-load-path (expand-file-name "private/cache/eln-cache/" user-emacs-directory))
 | 
					 | 
				
			||||||
    (setq package-native-compile t)
 | 
					    (setq package-native-compile t)
 | 
				
			||||||
    ))
 | 
					    ))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Instalar straight.el (reemplpazando package.el)
 | 
				
			||||||
 | 
					(defvar bootstrap-version)
 | 
				
			||||||
 | 
					(let ((bootstrap-file
 | 
				
			||||||
 | 
					      (expand-file-name "straight/repos/straight.el/bootstrap.el" user-emacs-directory))
 | 
				
			||||||
 | 
					      (bootstrap-version 5))
 | 
				
			||||||
 | 
					  (unless (file-exists-p bootstrap-file)
 | 
				
			||||||
 | 
					    (with-current-buffer
 | 
				
			||||||
 | 
					        (url-retrieve-synchronously
 | 
				
			||||||
 | 
					        "https://raw.githubusercontent.com/radian-software/straight.el/master/install.el"
 | 
				
			||||||
 | 
					        'silent 'inhibit-cookies)
 | 
				
			||||||
 | 
					      (goto-char (point-max))
 | 
				
			||||||
 | 
					      (eval-print-last-sexp)))
 | 
				
			||||||
 | 
					  (load bootstrap-file nil 'nomessage))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Initialize package sources
 | 
					;; Initialize package sources
 | 
				
			||||||
(require 'package)
 | 
					;; (require 'package)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
 | 
					;; (setq package-archives '(("melpa" . "https://melpa.org/packages/")
 | 
				
			||||||
                         ("org" . "https://orgmode.org/elpa/")
 | 
					;;                          ("org" . "https://orgmode.org/elpa/")
 | 
				
			||||||
                         ("elpa" . "https://elpa.gnu.org/packages/")))
 | 
					;;                          ("elpa" . "https://elpa.gnu.org/packages/")))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(package-initialize)
 | 
					;; (package-initialize)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Actualizar repositorios si aún no esta actualizados
 | 
					;; Actualizar repositorios si aún no esta actualizados
 | 
				
			||||||
(unless package-archive-contents
 | 
					;; (unless package-archive-contents
 | 
				
			||||||
  (package-refresh-contents))
 | 
					;;   (package-refresh-contents))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Instalar use-package si no está instalado
 | 
					;; Instalar use-package si no está instalado
 | 
				
			||||||
(unless (package-installed-p 'use-package)
 | 
					(straight-use-package 'use-package)
 | 
				
			||||||
  (package-install 'use-package))
 | 
					(setq use-package-always-ensure t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Theme
 | 
					;; Theme
 | 
				
			||||||
(use-package dracula-theme
 | 
					(use-package dracula-theme
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
  :config
 | 
					  :config
 | 
				
			||||||
  (load-theme 'dracula t)
 | 
					  (load-theme 'dracula t)
 | 
				
			||||||
  (set-face-attribute 'default nil :font "Fira Code Retina" :height 112) ; Font
 | 
					  (set-face-attribute 'default nil :font "Fira Code Retina" :height 112) ; Font
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Instalar use-package en caso de no tenerlo
 | 
					;; Instalar use-package en caso de no tenerlo
 | 
				
			||||||
(unless (package-installed-p 'use-package)
 | 
					;;(unless (package-installed-p 'use-package)
 | 
				
			||||||
  (package-install 'use-package))
 | 
					;;  (package-install 'use-package))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defconst private-dir  (expand-file-name "private" user-emacs-directory))
 | 
					(defconst private-dir  (expand-file-name "private" user-emacs-directory))
 | 
				
			||||||
(defconst temp-dir (format "%s/cache" private-dir)
 | 
					(defconst temp-dir (format "%s/cache" private-dir)
 | 
				
			||||||
@@ -71,7 +82,7 @@
 | 
				
			|||||||
(tooltip-mode -1)                               ; Disable tooltips.
 | 
					(tooltip-mode -1)                               ; Disable tooltips.
 | 
				
			||||||
(global-display-line-numbers-mode)              ; Mostar número de línea.
 | 
					(global-display-line-numbers-mode)              ; Mostar número de línea.
 | 
				
			||||||
(show-paren-mode 1)                             ; Habilitar resaltado de brackets.
 | 
					(show-paren-mode 1)                             ; Habilitar resaltado de brackets.
 | 
				
			||||||
;;(cua-mode t)                                    ; Usar CTRL+X, CTRL+C, CTRL+V y CTRL+Z para cortar, copiar, pegar y deshacer.
 | 
					(pending-delete-mode t)                         ; Cuando selecciono un texto y escribo, el texto se borra (emacs por defecto solo escribe donde está el cursor).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(setq-default
 | 
					(setq-default
 | 
				
			||||||
 cursor-type 'bar                               ; Usar la barrita como cursor
 | 
					 cursor-type 'bar                               ; Usar la barrita como cursor
 | 
				
			||||||
@@ -86,6 +97,9 @@
 | 
				
			|||||||
 global-hl-line-mode 1                          ; Resaltar línea actual por defecto.
 | 
					 global-hl-line-mode 1                          ; Resaltar línea actual por defecto.
 | 
				
			||||||
 tags-revert-without-query 1                    ; Recargar tags (ctags) sin pedir confirmación.
 | 
					 tags-revert-without-query 1                    ; Recargar tags (ctags) sin pedir confirmación.
 | 
				
			||||||
 )
 | 
					 )
 | 
				
			||||||
 | 
					;; Leve transparencia en emacs por defecto.
 | 
				
			||||||
 | 
					(set-frame-parameter (selected-frame) 'alpha '(98 . 98))
 | 
				
			||||||
 | 
					(add-to-list 'default-frame-alist '(alpha . (98 . 98)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Backups enabled, use nil to disable
 | 
					;; Backups enabled, use nil to disable
 | 
				
			||||||
(setq
 | 
					(setq
 | 
				
			||||||
@@ -100,8 +114,9 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
;; Configuración cuando es un server
 | 
					;; Configuración cuando es un server
 | 
				
			||||||
(defun setup-daemon ()
 | 
					(defun setup-daemon ()
 | 
				
			||||||
 | 
					  "Carga la configuración del modo daemon."
 | 
				
			||||||
  (message "Corriendo en modo daemon.")
 | 
					  (message "Corriendo en modo daemon.")
 | 
				
			||||||
  (set-face-attribute 'default nil :font "Fira Code Retina")
 | 
					  (set-face-attribute 'default nil :font "Fira Code Retina" :height 112)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  ;; Set the fixed pitch face
 | 
					  ;; Set the fixed pitch face
 | 
				
			||||||
  ;;(set-face-attribute 'fixed-pitch nil :font "Fira Code Retina")
 | 
					  ;;(set-face-attribute 'fixed-pitch nil :font "Fira Code Retina")
 | 
				
			||||||
@@ -115,11 +130,9 @@
 | 
				
			|||||||
  ;; Cerrar buffers al cerrar emacsclient
 | 
					  ;; Cerrar buffers al cerrar emacsclient
 | 
				
			||||||
  (add-hook 'delete-frame-functions
 | 
					  (add-hook 'delete-frame-functions
 | 
				
			||||||
            (lambda (frame)
 | 
					            (lambda (frame)
 | 
				
			||||||
              (let* ((window (frame-selected-window frame))
 | 
					              (mapc 'kill-buffer (delq (get-buffer "*dashboard*") (buffer-list)))
 | 
				
			||||||
                     (buffer (and window (window-buffer window))))
 | 
					              ))
 | 
				
			||||||
                (when (and buffer (buffer-file-name buffer))
 | 
					  )
 | 
				
			||||||
                  (kill-buffer buffer)))))
 | 
					 | 
				
			||||||
 )
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
(if (daemonp)
 | 
					(if (daemonp)
 | 
				
			||||||
    (add-hook 'after-make-frame-functions
 | 
					    (add-hook 'after-make-frame-functions
 | 
				
			||||||
@@ -128,8 +141,9 @@
 | 
				
			|||||||
                  (setup-daemon))))
 | 
					                  (setup-daemon))))
 | 
				
			||||||
  (message "Corriendo en modo normal."))
 | 
					  (message "Corriendo en modo normal."))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;(add-hook 'window-setup-hook 'toggle-frame-maximized t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(load custom-file)
 | 
					(load custom-file)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(provide 'base)
 | 
					(provide 'init-base)
 | 
				
			||||||
;;; base.el ends here
 | 
					;;; init-base.el ends here
 | 
				
			||||||
							
								
								
									
										57
									
								
								configs/init-company.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										57
									
								
								configs/init-company.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,57 @@
 | 
				
			|||||||
 | 
					;;; init-company.el --- Autocompletado con company-mode  -*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package company
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :defines (company-dabbrev-ignore-case company-dabbrev-downcase)
 | 
				
			||||||
 | 
					  :custom-face
 | 
				
			||||||
 | 
					  (company-box-selection ((t (:inherit company-tooltip :weight semibold :extend t))))
 | 
				
			||||||
 | 
					  :hook (after-init . global-company-mode)
 | 
				
			||||||
 | 
					  :bind (
 | 
				
			||||||
 | 
					         :map company-active-map
 | 
				
			||||||
 | 
					         ("<tab>" . company-indent-or-complete-common) ; Completar con tab como en la terminal de linux
 | 
				
			||||||
 | 
					         ("<escape>" . company-abort) ; Cerrar company con ESC
 | 
				
			||||||
 | 
					         )
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq company-tooltip-align-annotations t
 | 
				
			||||||
 | 
					        company-tooltip-limit 12
 | 
				
			||||||
 | 
					        company-idle-delay 0.5              ; mostrar autocompletado luego de medio segundo mostrar
 | 
				
			||||||
 | 
					        company-echo-delay (if (display-graphic-p) nil 0)
 | 
				
			||||||
 | 
					        company-minimum-prefix-length 1    ; mostrar autocompletado desde que se coloca la primera letra.
 | 
				
			||||||
 | 
					        company-icon-margin 3
 | 
				
			||||||
 | 
					        company-require-match nil
 | 
				
			||||||
 | 
					        company-dabbrev-ignore-case nil
 | 
				
			||||||
 | 
					        company-dabbrev-downcase nil      ; autocompletado case-sensitive.
 | 
				
			||||||
 | 
					        company-global-modes '(not erc-mode message-mode help-mode
 | 
				
			||||||
 | 
					                                   gud-mode eshell-mode shell-mode))
 | 
				
			||||||
 | 
					  (add-to-list 'company-backends 'company-paths)
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Rutas en company
 | 
				
			||||||
 | 
					(use-package company-paths
 | 
				
			||||||
 | 
					  :straight (company-paths :type git :host github :repo "emacs-vs/company-paths")
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :after (company-mode)
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Hacer que el autocompletado se vea más bonito con íconos
 | 
				
			||||||
 | 
					(use-package company-box
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :diminish
 | 
				
			||||||
 | 
					  :hook (company-mode . company-box-mode)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq company-box-backends-colors nil
 | 
				
			||||||
 | 
					              company-box-doc-delay 0.1
 | 
				
			||||||
 | 
					              company-box-scrollbar 'right)
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'init-company)
 | 
				
			||||||
 | 
					;;; init-company.el ends here
 | 
				
			||||||
							
								
								
									
										70
									
								
								configs/init-ctags.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								configs/init-ctags.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,70 @@
 | 
				
			|||||||
 | 
					;;; init-ctags.el --- Configuracíón de TAGS  -*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Ctags IDE on the True Editor
 | 
				
			||||||
 | 
					;; @see https://github.com/universal-ctags/citre#quick-start
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package citre
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :diminish
 | 
				
			||||||
 | 
					  :bind (("C-x c j" . citre-jump+)
 | 
				
			||||||
 | 
					         ("C-x c k" . citre-jump-back)
 | 
				
			||||||
 | 
					         ("C-x c p" . citre-peek)
 | 
				
			||||||
 | 
					         ("C-x c a" . citre-ace-peek)
 | 
				
			||||||
 | 
					         ("C-x c u" . citre-update-this-tags-file))
 | 
				
			||||||
 | 
					  :init
 | 
				
			||||||
 | 
					  (require 'citre-config)
 | 
				
			||||||
 | 
					  (setq citre-auto-enable-citre-mode-modes '(prog-mode))
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (with-no-warnings
 | 
				
			||||||
 | 
					    (setq citre-readtags-program "/usr/bin/readtags"
 | 
				
			||||||
 | 
					          citre-ctags-program "/usr/bin/ctags"
 | 
				
			||||||
 | 
					          citre-default-create-tags-file-location 'global-cache
 | 
				
			||||||
 | 
					          citre-use-project-root-when-creating-tags t
 | 
				
			||||||
 | 
					          citre-prompt-language-for-ctags-command t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    (with-eval-after-load 'projectile
 | 
				
			||||||
 | 
					      (setq citre-project-root-function #'projectile-project-root))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ;; Integrate with `lsp-mode' and `eglot'
 | 
				
			||||||
 | 
					    (define-advice xref--create-fetcher (:around (fn &rest args) fallback)
 | 
				
			||||||
 | 
					      (let ((fetcher (apply fn args))
 | 
				
			||||||
 | 
					            (citre-fetcher
 | 
				
			||||||
 | 
					             (let ((xref-backend-functions '(citre-xref-backend t)))
 | 
				
			||||||
 | 
					               (ignore xref-backend-functions)
 | 
				
			||||||
 | 
					               (apply fn args))))
 | 
				
			||||||
 | 
					        (lambda ()
 | 
				
			||||||
 | 
					          (or (with-demoted-errors "%s, fallback to citre"
 | 
				
			||||||
 | 
					                (funcall fetcher))
 | 
				
			||||||
 | 
					              (funcall citre-fetcher)))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    (defun lsp-citre-capf-function ()
 | 
				
			||||||
 | 
					      "A capf backend that tries lsp first, then Citre."
 | 
				
			||||||
 | 
					      (let ((lsp-result (if (fboundp #'eglot-completion-at-point)
 | 
				
			||||||
 | 
					                            (eglot-completion-at-point)
 | 
				
			||||||
 | 
					                        (when (fboundp #'lsp-completion-at-point)
 | 
				
			||||||
 | 
					                            (lsp-completion-at-point)))))
 | 
				
			||||||
 | 
					        (if (and lsp-result
 | 
				
			||||||
 | 
					                 (try-completion
 | 
				
			||||||
 | 
					                  (buffer-substring (nth 0 lsp-result)
 | 
				
			||||||
 | 
					                                    (nth 1 lsp-result))
 | 
				
			||||||
 | 
					                  (nth 2 lsp-result)))
 | 
				
			||||||
 | 
					            lsp-result
 | 
				
			||||||
 | 
					          (citre-completion-at-point))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    (defun enable-lsp-citre-capf-backend ()
 | 
				
			||||||
 | 
					      "Enable the lsp + Citre capf backend in current buffer."
 | 
				
			||||||
 | 
					      (add-hook 'completion-at-point-functions #'lsp-citre-capf-function nil t))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    (add-hook 'citre-mode-hook #'enable-lsp-citre-capf-backend)
 | 
				
			||||||
 | 
					  ))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'init-ctags)
 | 
				
			||||||
 | 
					;;; init-ctags.el ends here
 | 
				
			||||||
							
								
								
									
										61
									
								
								configs/init-eglot.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										61
									
								
								configs/init-eglot.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,61 @@
 | 
				
			|||||||
 | 
					;;; init-eglot.el --- Configuración de eglot (LSP)   -*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package eglot
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight (:type built-in)
 | 
				
			||||||
 | 
					  :hook ((css-mode . eglot-ensure)
 | 
				
			||||||
 | 
					         (html-mode . eglot-ensure)
 | 
				
			||||||
 | 
					         (php-mode . eglot-ensure)
 | 
				
			||||||
 | 
					         (rust-mode . eglot-ensure)
 | 
				
			||||||
 | 
					         (sh-mode . eglot-ensure))
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  ;; (add-to-list 'eglot-server-programs '(php-mode . ("intelephense" "--stdio")))
 | 
				
			||||||
 | 
					  (add-to-list 'eglot-server-programs '(php-mode . ("phpactor" "language-server" "-vvv")))
 | 
				
			||||||
 | 
					  (setq eglot-stay-out-of '(company))
 | 
				
			||||||
 | 
					  ;; (add-to-list 'eglot-ignored-server-capabilites :hoverProvider)
 | 
				
			||||||
 | 
					  ;; (add-to-list 'eglot-server-programs '(css-mode . ("vscode-css-language-server" "--stdio")))
 | 
				
			||||||
 | 
					  ;; (add-to-list 'eglot-server-programs '(html-mode . ("vscode-html-language-server" "--stdio")))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; (add-hook 'eglot--managed-mode-hook (lambda () (flymake-mode -1)))
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Emmet (mientras veo como hacer funcionar emmet-ls)
 | 
				
			||||||
 | 
					(use-package emmet-mode
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook
 | 
				
			||||||
 | 
					  ((html-mode . emmet-mode)
 | 
				
			||||||
 | 
					   (web-mode . emmet-mode))
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Revisar por errores en el código
 | 
				
			||||||
 | 
					(use-package flymake
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight (:type built-in)
 | 
				
			||||||
 | 
					  :hook (prog-mode . (lambda ()
 | 
				
			||||||
 | 
					                       (unless (derived-mode-p 'makefile-mode)
 | 
				
			||||||
 | 
					                         (flymake-mode))))
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Mostar los errores de flymake en un popup-tip
 | 
				
			||||||
 | 
					(use-package flymake-diagnostic-at-point
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :after flymake
 | 
				
			||||||
 | 
					  :hook (flymake-mode . flymake-diagnostic-at-point-mode))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Mostrar eldoc en un popup
 | 
				
			||||||
 | 
					;; (use-package eldoc-box
 | 
				
			||||||
 | 
					;;   :defer t
 | 
				
			||||||
 | 
					;;   :straight t
 | 
				
			||||||
 | 
					;;   :hook (eldoc-mode-hook . eldoc-box-hover-at-point-mode ))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'init-eglot)
 | 
				
			||||||
 | 
					;;; init-eglot.el ends here
 | 
				
			||||||
							
								
								
									
										86
									
								
								configs/init-evil.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										86
									
								
								configs/init-evil.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,86 @@
 | 
				
			|||||||
 | 
					;;; init-evil.el --- VIM dentro de emacs  -*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					(use-package evil
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook (after-init . evil-mode)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  ;; Configuraciones básicas
 | 
				
			||||||
 | 
					  (setq evil-default-state 'emacs) ;; Modo por defecto en emacs
 | 
				
			||||||
 | 
					  (setq evil-emacs-state-cursor 'bar) ;; Cursor de emacs state en bar
 | 
				
			||||||
 | 
					  (evil-set-leader 'motion (kbd "SPC")) ;; Leader key
 | 
				
			||||||
 | 
					  (evil-set-undo-system 'undo-redo)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Habilitar atajos de de tecla de emacs en insert state
 | 
				
			||||||
 | 
					  (setq evil-insert-state-map (make-sparse-keymap))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Ingresar en normal state con ESC desde insert state o desde Emacs state
 | 
				
			||||||
 | 
					  (evil-define-key 'insert 'global (kbd "<escape>") 'evil-normal-state)
 | 
				
			||||||
 | 
					  ;; (evil-define-key 'emacs 'global (kbd "<escape>") 'evil-normal-state)
 | 
				
			||||||
 | 
					  ;; Cambiar Insert state por emacs state.
 | 
				
			||||||
 | 
					  ;; (defalias 'evil-insert-state 'evil-emacs-state)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Variales locales (todos los estados o solo los estados de VIM)
 | 
				
			||||||
 | 
					  (setq all-states '(normal insert visual replace operator motion emacs))
 | 
				
			||||||
 | 
					  (setq vim-states '(normal insert visual replace operator motion))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Cambiar entre modo emacs y evil (Mi pripio evil toggle)
 | 
				
			||||||
 | 
					  (evil-define-key vim-states 'global (kbd "C-'") 'evil-emacs-state)
 | 
				
			||||||
 | 
					  (evil-define-key 'emacs 'global (kbd "C-'") 'evil-normal-state)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Cambiar C-z a deshacer
 | 
				
			||||||
 | 
					  (evil-define-key all-states 'global (kbd "C-z") 'undo)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Cambiar C-r a ripgrep y U hasta hacer redo
 | 
				
			||||||
 | 
					  (evil-define-key vim-states 'global (kbd "C-r") 'counsel-rg)
 | 
				
			||||||
 | 
					  (evil-define-key 'normal 'global (kbd "U") 'undo-redo)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Arreglar yank-pop en normal mode
 | 
				
			||||||
 | 
					  (evil-define-key 'normal 'global (kbd "M-y") 'counsel-yank-pop)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Re-bindear C-p y C-n a como es normalmente
 | 
				
			||||||
 | 
					  (evil-define-key 'normal 'global (kbd "C-p") 'previous-line)
 | 
				
			||||||
 | 
					  (evil-define-key 'normal 'global (kbd "C-n") 'next-line)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Navegación entre frames
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>wh") 'windmove-left)
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>wj") 'windmove-down)
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>wk") 'windmove-up)
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>wl") 'windmove-right)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Atajos con leader key para frames
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>0") 'delete-window)
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>1") 'delete-other-windows)
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>2") 'split-window-below)
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>3") 'split-window-right)
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>k") 'kill-buffer)
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>wu") 'winner-undo)
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>wr") 'winner-redo)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Cambios de modos
 | 
				
			||||||
 | 
					  (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)
 | 
				
			||||||
 | 
					  (evil-define-key 'normal 'global (kbd "<leader>mr") 'rust-mode)
 | 
				
			||||||
 | 
					  (evil-define-key 'normal 'global (kbd "<leader>mw") 'web-mode)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Otros atajos
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>b") 'ivy-switch-buffer)          ;; Cambiar de buffer
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>p") 'counsel-projectile)         ;; Archivos del proyecto (o abrir proyecto si no hay alguno)
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>cp") 'projectile-switch-project) ;; Cambiar proyecto
 | 
				
			||||||
 | 
					  (evil-define-key 'motion 'global (kbd "<leader>ff") 'counsel-find-file)         ;; Abrir archivo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Iniciar en normal state si es un lenguaje de programación
 | 
				
			||||||
 | 
					  (evil-set-initial-state 'prog-mode 'normal)
 | 
				
			||||||
 | 
					  (evil-set-initial-state 'org-mode 'normal)
 | 
				
			||||||
 | 
					  (evil-set-initial-state 'dashboard-mode 'normal)
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'init-evil)
 | 
				
			||||||
 | 
					;;; init-evil.el ends here
 | 
				
			||||||
							
								
								
									
										67
									
								
								configs/init-functions.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										67
									
								
								configs/init-functions.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,67 @@
 | 
				
			|||||||
 | 
					;;; init-functions.el --- Configuración de org-mode	-*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Permite cambiar la transparencia de emacs.
 | 
				
			||||||
 | 
					(defun transparency (value)
 | 
				
			||||||
 | 
					  "Change the transparency of the frame window, setting VALUE from 0 to 100."
 | 
				
			||||||
 | 
					  (interactive "nTransparency Value 0 - 100 opaque:")
 | 
				
			||||||
 | 
					  (set-frame-parameter (selected-frame) 'alpha value))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Crear captura SVG del frame atual. Fuente: https://www.reddit.com/r/emacs/comments/idz35e/emacs_27_can_take_svg_screenshots_of_itself/
 | 
				
			||||||
 | 
					(defun screenshot-svg ()
 | 
				
			||||||
 | 
					  "Save a screenshot of the current frame as an SVG image.
 | 
				
			||||||
 | 
					Saves to a temp file and puts the filename in the kill ring."
 | 
				
			||||||
 | 
					  (interactive)
 | 
				
			||||||
 | 
					  (let* ((filename (make-temp-file "Emacs" nil ".svg"))
 | 
				
			||||||
 | 
					         (data (x-export-frames nil 'svg)))
 | 
				
			||||||
 | 
					    (with-temp-file filename
 | 
				
			||||||
 | 
					      (insert data))
 | 
				
			||||||
 | 
					    (kill-new filename)
 | 
				
			||||||
 | 
					    (message filename)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Comentar línea o región
 | 
				
			||||||
 | 
					(defun comment-or-uncomment-region-or-line ()
 | 
				
			||||||
 | 
					    "Comments or uncomments the region or the current line."
 | 
				
			||||||
 | 
					    (interactive)
 | 
				
			||||||
 | 
					    (let (beg end)
 | 
				
			||||||
 | 
					        (if (region-active-p)
 | 
				
			||||||
 | 
					            (setq beg (region-beginning) end (region-end))
 | 
				
			||||||
 | 
					            (setq beg (line-beginning-position) end (line-end-position)))
 | 
				
			||||||
 | 
					        (comment-or-uncomment-region beg end)
 | 
				
			||||||
 | 
					        ;;(next-line) ;; saltar a la siguiente línea
 | 
				
			||||||
 | 
					        ))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Duplicar la línea actual
 | 
				
			||||||
 | 
					(defun duplicate-current-line (&optional n)
 | 
				
			||||||
 | 
					  "Duplicate current line, make more than 1 copy given a numeric (N) argument."
 | 
				
			||||||
 | 
					  (interactive "p")
 | 
				
			||||||
 | 
					  (save-excursion
 | 
				
			||||||
 | 
					    (let ((nb (or n 1))
 | 
				
			||||||
 | 
					    	  (current-line (thing-at-point 'line)))
 | 
				
			||||||
 | 
					      ;; when on last line, insert a newline first
 | 
				
			||||||
 | 
					      (when (or (= 1 (forward-line 1)) (eq (point) (point-max)))
 | 
				
			||||||
 | 
					    	(insert "\n"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      ;; now insert as many time as requested
 | 
				
			||||||
 | 
					      (while (> n 0)
 | 
				
			||||||
 | 
					    	(insert current-line)
 | 
				
			||||||
 | 
					    	(decf n)))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Borrar espacios, tabs y saltos de línea innecesarios al guardar
 | 
				
			||||||
 | 
					(add-hook 'before-save-hook 'delete-trailing-whitespace)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Verifica si es está instalado alltheicons (útil para ver si se usa o no íconos)
 | 
				
			||||||
 | 
					(defun icon-displayable-p ()
 | 
				
			||||||
 | 
					  "Return non-nil if icons are displayable."
 | 
				
			||||||
 | 
					  (and (display-graphic-p) (daemonp)
 | 
				
			||||||
 | 
					       (or (featurep 'all-the-icons)
 | 
				
			||||||
 | 
					           (require 'all-the-icons nil t))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'init-functions)
 | 
				
			||||||
 | 
					;;; init-functions.el ends here.
 | 
				
			||||||
							
								
								
									
										130
									
								
								configs/init-ivy.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										130
									
								
								configs/init-ivy.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,130 @@
 | 
				
			|||||||
 | 
					;;; init-ivy.el --- Ayuditas y autocompletado del minibufer  -*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Autocompletado para el minibuffer (counsel e ivy)
 | 
				
			||||||
 | 
					(use-package counsel
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :diminish ivy-mode counsel-mode
 | 
				
			||||||
 | 
					  :bind (("C-s"   . swiper-isearch)
 | 
				
			||||||
 | 
					         ("C-r"   . counsel-rg)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         ("C-c C-r" . ivy-resume)
 | 
				
			||||||
 | 
					         ("C-c v p" . ivy-push-view)
 | 
				
			||||||
 | 
					         ("C-c v o" . ivy-pop-view)
 | 
				
			||||||
 | 
					         ("C-c v ." . ivy-switch-view)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         :map counsel-mode-map
 | 
				
			||||||
 | 
					         ([remap swiper] . counsel-grep-or-swiper)
 | 
				
			||||||
 | 
					         ([remap swiper-backward] . counsel-grep-or-swiper-backward)
 | 
				
			||||||
 | 
					         ([remap dired] . counsel-dired)
 | 
				
			||||||
 | 
					         ([remap set-variable] . counsel-set-variable)
 | 
				
			||||||
 | 
					         ([remap insert-char] . counsel-unicode-char)
 | 
				
			||||||
 | 
					         ([remap recentf-open-files] . counsel-recentf)
 | 
				
			||||||
 | 
					         ([remap org-capture] . counsel-org-capture)
 | 
				
			||||||
 | 
					         ([remap jump-to-register] . counsel-register)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         :map ivy-minibuffer-map
 | 
				
			||||||
 | 
					         ("C-w" . ivy-yank-word)
 | 
				
			||||||
 | 
					         ("<tab>" . ivy-partial)
 | 
				
			||||||
 | 
					         ("<escape>" . minibuffer-keyboard-quit)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         :map counsel-find-file-map
 | 
				
			||||||
 | 
					         ("C-h" . counsel-up-directory)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         :map swiper-map
 | 
				
			||||||
 | 
					         ("M-%" . swiper-query-replace)
 | 
				
			||||||
 | 
					         )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  :hook ((after-init . ivy-mode)
 | 
				
			||||||
 | 
					         (ivy-mode . counsel-mode))
 | 
				
			||||||
 | 
					  :init
 | 
				
			||||||
 | 
					  (setq enable-recursive-minibuffers t) ; Allow commands in minibuffers
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  (setq ivy-height 12
 | 
				
			||||||
 | 
					        ivy-use-selectable-prompt t
 | 
				
			||||||
 | 
					        ivy-use-virtual-buffers t    ; Enable bookmarks and recentf
 | 
				
			||||||
 | 
					        ivy-fixed-height-minibuffer t
 | 
				
			||||||
 | 
					        ivy-count-format "(%d/%d) "
 | 
				
			||||||
 | 
					        ivy-ignore-buffers '("\\` " "\\`\\*tramp/" "\\`\\*xref" "\\`\\*helpful "
 | 
				
			||||||
 | 
					                             "\\`\\*.+-posframe-buffer\\*" "\\` ?\\*company-.+\\*")
 | 
				
			||||||
 | 
					        ivy-on-del-error-function #'ignore
 | 
				
			||||||
 | 
					        ivy-initial-inputs-alist nil)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Use orderless regex strategy
 | 
				
			||||||
 | 
					  (setq ivy-re-builders-alist '((t . ivy--regex-ignore-order)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Set minibuffer height for different commands
 | 
				
			||||||
 | 
					  (setq ivy-height-alist '((counsel-evil-registers . 5)
 | 
				
			||||||
 | 
					                           (counsel-yank-pop . 8)
 | 
				
			||||||
 | 
					                           (counsel-git-log . 4)
 | 
				
			||||||
 | 
					                           (swiper . 15)
 | 
				
			||||||
 | 
					                           (counsel-projectile-ag . 15)
 | 
				
			||||||
 | 
					                           (counsel-projectile-rg . 15)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  (setq swiper-action-recenter t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  (setq counsel-find-file-at-point t
 | 
				
			||||||
 | 
					        counsel-preselect-current-file t
 | 
				
			||||||
 | 
					        counsel-yank-pop-separator "\n────────\n")
 | 
				
			||||||
 | 
					  (add-hook 'counsel-grep-post-action-hook #'recenter)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Use the faster search tools
 | 
				
			||||||
 | 
					  (when (executable-find "rg")
 | 
				
			||||||
 | 
					    (setq counsel-grep-base-command "rg -S --no-heading --line-number --color never '%s' '%s'"))
 | 
				
			||||||
 | 
					  (when (executable-find "fd")
 | 
				
			||||||
 | 
					    (setq counsel-fzf-cmd
 | 
				
			||||||
 | 
					          "fd --type f --hidden --follow --exclude .git --color never '%s'"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Autocompletado de proyectos en counsel (projectile)
 | 
				
			||||||
 | 
					(use-package counsel-projectile
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :bind*
 | 
				
			||||||
 | 
					  ("C-x p" . counsel-projectile)
 | 
				
			||||||
 | 
					  :hook (counsel-mode . counsel-projectile-mode)
 | 
				
			||||||
 | 
					  :init (setq counsel-projectile-grep-initial-input '(ivy-thing-at-point)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package ivy
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook (after-init . ivy-mode)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq ivy-use-virtual-buffers nil))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package ivy-rich
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :ensure t
 | 
				
			||||||
 | 
					  :hook ((counsel-projectile-mode . ivy-rich-mode) ; MUST after `counsel-projectile'
 | 
				
			||||||
 | 
					         (ivy-rich-mode . ivy-rich-project-root-cache-mode)
 | 
				
			||||||
 | 
					         (ivy-rich-mode . (lambda ()
 | 
				
			||||||
 | 
					                            "Use abbreviate in `ivy-rich-mode'."
 | 
				
			||||||
 | 
					                            (setq ivy-virtual-abbreviate
 | 
				
			||||||
 | 
					                                  (or (and ivy-rich-mode 'abbreviate) 'name)))))
 | 
				
			||||||
 | 
					  :init
 | 
				
			||||||
 | 
					  ;; For better performance
 | 
				
			||||||
 | 
					  (setq ivy-rich-parse-remote-buffer nil))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Iconos en Ivy (allthe icons)
 | 
				
			||||||
 | 
					(use-package all-the-icons-ivy-rich
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :ensure t
 | 
				
			||||||
 | 
					  :hook (ivy-mode . all-the-icons-ivy-rich-mode)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq all-the-icons-ivy-rich-color-icon t))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'init-ivy)
 | 
				
			||||||
 | 
					;;; init-ivy.el ends here
 | 
				
			||||||
							
								
								
									
										46
									
								
								configs/init-keys.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								configs/init-keys.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,46 @@
 | 
				
			|||||||
 | 
					;;; init-keys.el --- Archivo de configuración de atajos   -*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Aquí se configuran los atajos globales.
 | 
				
			||||||
 | 
					;; Es posible que haya otros, ya que muchos se configuran
 | 
				
			||||||
 | 
					;; directamente en los paquetes/extensiones y dependen de los mismos.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-x C-z") nil)                      ; Unbind C-x C-z (don't minimize)
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-z") 'undo)                        ; Unbind C-z y hacerlo funcionar para deshacer cambios
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-S-z") 'undo-redo)                 ; Rehacer cambios con C-S-z
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-S-a") 'mark-whole-buffer)         ; Seleccionar todo con CTRL+SHIFT+a.
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-S-c")
 | 
				
			||||||
 | 
					                'comment-or-uncomment-region-or-line)     ; Comentar/descomentar línea o selección
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-<f11>") 'toggle-frame-maximized)  ; Maximizar / restaurar
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-S-d") 'duplicate-current-line)    ; Duplicar línea
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-S-l") 'sort-lines)                ; Ordenar líneas alfabéticamente
 | 
				
			||||||
 | 
					(global-set-key (kbd "<mouse-3>") 'context-menu-open)     ; Ordenar líneas alfabéticamente
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Cambios rápidos de major modes
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-x m") nil)                        ; Unbind mail on C-x m
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-x mh") 'html-mode)
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-x mj") 'js-mode)
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-x mp") 'php-mode)
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-x mr") 'rust-mode)
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-x mw") 'web-mode)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Atajos de windmove
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-x <left>") 'windmove-left)
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-x <right>") 'windmove-right)
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-x <up>") 'windmove-up)
 | 
				
			||||||
 | 
					(global-set-key (kbd "C-x <down>") 'windmove-down)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Meta atajos (atajos de atajos)
 | 
				
			||||||
 | 
					;;(global-set-key (kbd "C-c l d") "\C-a\C- \C-n\M-w\C-y") ; Duplicar línea
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Deactivar el abrir *messages* al cliquear en el minibuffer
 | 
				
			||||||
 | 
					(define-key minibuffer-inactive-mode-map [mouse-1] #'ignore)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'init-keys)
 | 
				
			||||||
 | 
					;;; init-keys.el ends here
 | 
				
			||||||
							
								
								
									
										267
									
								
								configs/init-lsp.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										267
									
								
								configs/init-lsp.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,267 @@
 | 
				
			|||||||
 | 
					;;; init-lsp.el --- Languaje server protocol. 	-*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Performace tuning
 | 
				
			||||||
 | 
					;; @see https://emacs-lsp.github.io/lsp-mode/page/performance/
 | 
				
			||||||
 | 
					(setq read-process-output-max (* 1024 (* 3 1024))) ;; 3MB
 | 
				
			||||||
 | 
					(setenv "LSP_USE_PLISTS" "true")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package lsp-mode
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :diminish
 | 
				
			||||||
 | 
					  :commands (lsp-enable-which-key-integration
 | 
				
			||||||
 | 
					             lsp-format-buffer
 | 
				
			||||||
 | 
					             lsp-organize-imports
 | 
				
			||||||
 | 
					             lsp-install-server)
 | 
				
			||||||
 | 
					  :hook ((prog-mode . (lambda ()
 | 
				
			||||||
 | 
					                        (unless (derived-mode-p 'emacs-lisp-mode 'lisp-mode 'makefile-mode 'sql-mode)
 | 
				
			||||||
 | 
					                          (lsp-deferred))))
 | 
				
			||||||
 | 
					         (html-mode . lsp-deferred)
 | 
				
			||||||
 | 
					         (markdown-mode . lsp-deferred)
 | 
				
			||||||
 | 
					         (lsp-mode . lsp-enable-which-key-integration))
 | 
				
			||||||
 | 
					  :custom
 | 
				
			||||||
 | 
					  (lsp-headerline-breadcrumb-enable nil)
 | 
				
			||||||
 | 
					  :init (setq lsp-keymap-prefix "C-c l"
 | 
				
			||||||
 | 
					              lsp-keep-workspace-alive nil
 | 
				
			||||||
 | 
					              lsp-signature-auto-activate nil
 | 
				
			||||||
 | 
					              lsp-modeline-code-actions-enable nil
 | 
				
			||||||
 | 
					              lsp-modeline-diagnostics-enable nil
 | 
				
			||||||
 | 
					              lsp-modeline-workspace-status-enable nil
 | 
				
			||||||
 | 
					              lsp-headerline-breadcrumb-enable nil
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              lsp-enable-file-watchers nil
 | 
				
			||||||
 | 
					              lsp-enable-folding nil
 | 
				
			||||||
 | 
					              lsp-enable-links nil
 | 
				
			||||||
 | 
					              lsp-enable-symbol-highlighting nil
 | 
				
			||||||
 | 
					              lsp-enable-semantic-highlighting nil
 | 
				
			||||||
 | 
					              cls-sem-highlight-method nil
 | 
				
			||||||
 | 
					              lsp-enable-text-document-color nil
 | 
				
			||||||
 | 
					              lsp-lens-enable nil
 | 
				
			||||||
 | 
					              lsp-auto-guess-root t
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              lsp-log-io nil
 | 
				
			||||||
 | 
					              lsp-idle-delay 0.5
 | 
				
			||||||
 | 
					              lsp-diagnostic-package :none ; Evitar que lsp conecte con flycheck para evitar que se congele
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              lsp-enable-indentation nil
 | 
				
			||||||
 | 
					              lsp-enable-on-type-formatting nil)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (with-no-warnings
 | 
				
			||||||
 | 
					    ;; Remove php extension on form lsp
 | 
				
			||||||
 | 
					    (setq lsp-language-id-configuration
 | 
				
			||||||
 | 
					          (remove '(".*\\.php$" . "php") lsp-language-id-configuration))
 | 
				
			||||||
 | 
					    (add-to-list 'lsp-language-id-configuration '(web-mode . "html"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ;; Disable `lsp-mode' in `git-timemachine-mode'
 | 
				
			||||||
 | 
					    (defun my-lsp--init-if-visible (fn &rest args)
 | 
				
			||||||
 | 
					      (unless (bound-and-true-p git-timemachine-mode)
 | 
				
			||||||
 | 
					        (apply fn args)))
 | 
				
			||||||
 | 
					    (advice-add #'lsp--init-if-visible :around #'my-lsp--init-if-visible)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ;; Enable `lsp-mode' in sh/bash/zsh
 | 
				
			||||||
 | 
					    (defun my-lsp-bash-check-sh-shell (&rest _)
 | 
				
			||||||
 | 
					      (and (eq major-mode 'sh-mode)
 | 
				
			||||||
 | 
					           (memq sh-shell '(sh bash zsh))))
 | 
				
			||||||
 | 
					    (advice-add #'lsp-bash-check-sh-shell :override #'my-lsp-bash-check-sh-shell)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ;; Only display icons in GUI
 | 
				
			||||||
 | 
					    (defun my-lsp-icons-get-symbol-kind (fn &rest args)
 | 
				
			||||||
 | 
					      (and (icon-displayable-p) (apply fn args)))
 | 
				
			||||||
 | 
					    (advice-add #'lsp-icons-get-by-symbol-kind :around #'my-lsp-icons-get-symbol-kind)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    (defun my-lsp-icons-get-by-file-ext (fn &rest args)
 | 
				
			||||||
 | 
					      (and (icon-displayable-p) (apply fn args)))
 | 
				
			||||||
 | 
					    (advice-add #'lsp-icons-get-by-file-ext :around #'my-lsp-icons-get-by-file-ext)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    (defun my-lsp-icons-all-the-icons-material-icon (icon-name face fallback &optional feature)
 | 
				
			||||||
 | 
					      (if (and (icon-displayable-p)
 | 
				
			||||||
 | 
					               (lsp-icons--enabled-for-feature feature))
 | 
				
			||||||
 | 
					          (all-the-icons-material icon-name
 | 
				
			||||||
 | 
					                                  :face face)
 | 
				
			||||||
 | 
					        (propertize fallback 'face face)))
 | 
				
			||||||
 | 
					    (advice-add #'lsp-icons-all-the-icons-material-icon
 | 
				
			||||||
 | 
					                :override #'my-lsp-icons-all-the-icons-material-icon))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Interface para lsp
 | 
				
			||||||
 | 
					(use-package lsp-ui
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :bind (:map lsp-mode-map
 | 
				
			||||||
 | 
					              ("<f1>" . lsp-ui-doc-glance))
 | 
				
			||||||
 | 
					  :hook (lsp-mode . lsp-ui-mode)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  :init
 | 
				
			||||||
 | 
					  (setq lsp-ui-sideline-show-code-actions nil
 | 
				
			||||||
 | 
					        lsp-ui-sideline-show-symbol nil
 | 
				
			||||||
 | 
					        lsp-ui-sideline-show-hover nil
 | 
				
			||||||
 | 
					        lsp-ui-sideline-delay 0.5)
 | 
				
			||||||
 | 
					  (setq lsp-ui-sideline-show-diagnostics nil
 | 
				
			||||||
 | 
					        lsp-ui-sideline-ignore-duplicate t
 | 
				
			||||||
 | 
					        lsp-ui-doc-show-with-cursor  nil
 | 
				
			||||||
 | 
					        lsp-ui-doc-show-with-mouse nil
 | 
				
			||||||
 | 
					        lsp-ui-doc-position 'at-point
 | 
				
			||||||
 | 
					        lsp-ui-doc-delay 0.1
 | 
				
			||||||
 | 
					        lsp-ui-imenu-colors `(,(face-foreground 'font-lock-keyword-face)
 | 
				
			||||||
 | 
					                              ,(face-foreground 'font-lock-string-face)
 | 
				
			||||||
 | 
					                              ,(face-foreground 'font-lock-constant-face)
 | 
				
			||||||
 | 
					                              ,(face-foreground 'font-lock-variable-name-face)))
 | 
				
			||||||
 | 
					  ;; Set correct color to borders
 | 
				
			||||||
 | 
					  (defun my-lsp-ui-doc-set-border ()
 | 
				
			||||||
 | 
					    "Set the border color of lsp doc."
 | 
				
			||||||
 | 
					    (setq lsp-ui-doc-border
 | 
				
			||||||
 | 
					          (if (facep 'posframe-border)
 | 
				
			||||||
 | 
					              (face-background 'posframe-border nil t)
 | 
				
			||||||
 | 
					            (face-foreground 'shadow nil t))))
 | 
				
			||||||
 | 
					  (my-lsp-ui-doc-set-border)
 | 
				
			||||||
 | 
					  (add-hook 'after-load-theme-hook #'my-lsp-ui-doc-set-border t)
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Integración con ivy
 | 
				
			||||||
 | 
					(use-package lsp-ivy
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :after lsp-mode
 | 
				
			||||||
 | 
					  :bind (:map lsp-mode-map
 | 
				
			||||||
 | 
					              ([remap xref-find-apropos] . lsp-ivy-workspace-symbol)
 | 
				
			||||||
 | 
					              ("C-s-." . lsp-ivy-global-workspace-symbol))
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (with-no-warnings
 | 
				
			||||||
 | 
					    (when (icon-displayable-p)
 | 
				
			||||||
 | 
					      (defvar lsp-ivy-symbol-kind-icons
 | 
				
			||||||
 | 
					        `(,(all-the-icons-material "find_in_page" :height 0.9 :v-adjust -0.15) ; Unknown - 0
 | 
				
			||||||
 | 
					          ,(all-the-icons-faicon "file-o" :height 0.9 :v-adjust -0.02) ; File - 1
 | 
				
			||||||
 | 
					          ,(all-the-icons-material "view_module" :height 0.9 :v-adjust -0.15 :face 'all-the-icons-lblue) ; Module - 2
 | 
				
			||||||
 | 
					          ,(all-the-icons-material "view_module" :height 0.95 :v-adjust -0.15 :face 'all-the-icons-lblue) ; Namespace - 3
 | 
				
			||||||
 | 
					          ,(all-the-icons-octicon "package" :height 0.9 :v-adjust -0.15) ; Package - 4
 | 
				
			||||||
 | 
					          ,(all-the-icons-material "settings_input_component" :height 0.9 :v-adjust -0.15 :face 'all-the-icons-orange) ; Class - 5
 | 
				
			||||||
 | 
					          ,(all-the-icons-faicon "cube" :height 0.9 :v-adjust -0.02 :face 'all-the-icons-purple) ; Method - 6
 | 
				
			||||||
 | 
					          ,(all-the-icons-faicon "wrench" :height 0.8 :v-adjust -0.02) ; Property - 7
 | 
				
			||||||
 | 
					          ,(all-the-icons-octicon "tag" :height 0.95 :v-adjust 0 :face 'all-the-icons-lblue) ; Field - 8
 | 
				
			||||||
 | 
					          ,(all-the-icons-faicon "cube" :height 0.9 :v-adjust -0.02 :face 'all-the-icons-lpurple) ; Constructor - 9
 | 
				
			||||||
 | 
					          ,(all-the-icons-material "storage" :height 0.9 :v-adjust -0.15 :face 'all-the-icons-orange) ; Enum - 10
 | 
				
			||||||
 | 
					          ,(all-the-icons-material "share" :height 0.9 :v-adjust -0.15 :face 'all-the-icons-lblue) ; Interface - 11
 | 
				
			||||||
 | 
					          ,(all-the-icons-faicon "cube" :height 0.9 :v-adjust -0.02 :face 'all-the-icons-purple) ; Function - 12
 | 
				
			||||||
 | 
					          ,(all-the-icons-octicon "tag" :height 0.95 :v-adjust 0 :face 'all-the-icons-lblue) ; Variable - 13
 | 
				
			||||||
 | 
					          ,(all-the-icons-faicon "cube" :height 0.9 :v-adjust -0.02 :face 'all-the-icons-purple) ; Constant - 14
 | 
				
			||||||
 | 
					          ,(all-the-icons-faicon "text-width" :height 0.9 :v-adjust -0.02) ; String - 15
 | 
				
			||||||
 | 
					          ,(all-the-icons-material "format_list_numbered" :height 0.95 :v-adjust -0.15) ; Number - 16
 | 
				
			||||||
 | 
					          ,(all-the-icons-octicon "tag" :height 0.9 :v-adjust 0.0 :face 'all-the-icons-lblue) ; Boolean - 17
 | 
				
			||||||
 | 
					          ,(all-the-icons-material "view_array" :height 0.95 :v-adjust -0.15) ; Array - 18
 | 
				
			||||||
 | 
					          ,(all-the-icons-octicon "tag" :height 0.9 :v-adjust 0.0 :face 'all-the-icons-blue) ; Object - 19
 | 
				
			||||||
 | 
					          ,(all-the-icons-faicon "key" :height 0.9 :v-adjust -0.02) ; Key - 20
 | 
				
			||||||
 | 
					          ,(all-the-icons-octicon "tag" :height 0.9 :v-adjust 0.0) ; Null - 21
 | 
				
			||||||
 | 
					          ,(all-the-icons-material "format_align_right" :height 0.95 :v-adjust -0.15 :face 'all-the-icons-lblue) ; EnumMember - 22
 | 
				
			||||||
 | 
					          ,(all-the-icons-material "settings_input_component" :height 0.9 :v-adjust -0.15 :face 'all-the-icons-orange) ; Struct - 23
 | 
				
			||||||
 | 
					          ,(all-the-icons-octicon "zap" :height 0.9 :v-adjust 0 :face 'all-the-icons-orange) ; Event - 24
 | 
				
			||||||
 | 
					          ,(all-the-icons-material "control_point" :height 0.9 :v-adjust -0.15) ; Operator - 25
 | 
				
			||||||
 | 
					          ,(all-the-icons-faicon "arrows" :height 0.9 :v-adjust -0.02) ; TypeParameter - 26
 | 
				
			||||||
 | 
					          ))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      (lsp-defun my-lsp-ivy--format-symbol-match
 | 
				
			||||||
 | 
					                 ((sym &as &SymbolInformation :kind :location (&Location :uri))
 | 
				
			||||||
 | 
					                  project-root)
 | 
				
			||||||
 | 
					                 "Convert the match returned by `lsp-mode` into a candidate string."
 | 
				
			||||||
 | 
					                 (let* ((sanitized-kind (if (< kind (length lsp-ivy-symbol-kind-icons)) kind 0))
 | 
				
			||||||
 | 
					                        (type (elt lsp-ivy-symbol-kind-icons sanitized-kind))
 | 
				
			||||||
 | 
					                        (typestr (if lsp-ivy-show-symbol-kind (format "%s " type) ""))
 | 
				
			||||||
 | 
					                        (pathstr (if lsp-ivy-show-symbol-filename
 | 
				
			||||||
 | 
					                                     (propertize (format " · %s" (file-relative-name (lsp--uri-to-path uri) project-root))
 | 
				
			||||||
 | 
					                                                 'face font-lock-comment-face)
 | 
				
			||||||
 | 
					                                   "")))
 | 
				
			||||||
 | 
					                   (concat typestr (lsp-render-symbol-information sym ".") pathstr)))
 | 
				
			||||||
 | 
					      (advice-add #'lsp-ivy--format-symbol-match :override #'my-lsp-ivy--format-symbol-match))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Debug
 | 
				
			||||||
 | 
					(use-package dap-mode
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :defines dap-python-executable
 | 
				
			||||||
 | 
					  :functions dap-hydra/nil
 | 
				
			||||||
 | 
					  :diminish
 | 
				
			||||||
 | 
					  :bind (:map lsp-mode-map
 | 
				
			||||||
 | 
					              ("<f5>" . dap-debug)
 | 
				
			||||||
 | 
					              ("M-<f5>" . dap-hydra))
 | 
				
			||||||
 | 
					  :hook ((after-init . dap-auto-configure-mode)
 | 
				
			||||||
 | 
					         (dap-stopped . (lambda (_args) (dap-hydra)))
 | 
				
			||||||
 | 
					         (dap-terminated . (lambda (_args) (dap-hydra/nil)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					         (python-mode . (lambda () (require 'dap-python)))
 | 
				
			||||||
 | 
					         (ruby-mode . (lambda () (require 'dap-ruby)))
 | 
				
			||||||
 | 
					         (go-mode . (lambda () (require 'dap-go)))
 | 
				
			||||||
 | 
					         (java-mode . (lambda () (require 'dap-java)))
 | 
				
			||||||
 | 
					         ((c-mode c++-mode objc-mode swift-mode) . (lambda () (require 'dap-lldb)))
 | 
				
			||||||
 | 
					         (php-mode . (lambda () (require 'dap-php)))
 | 
				
			||||||
 | 
					         (elixir-mode . (lambda () (require 'dap-elixir)))
 | 
				
			||||||
 | 
					         ((js-mode js2-mode) . (lambda () (require 'dap-chrome)))
 | 
				
			||||||
 | 
					         (powershell-mode . (lambda () (require 'dap-pwsh))))
 | 
				
			||||||
 | 
					  :init
 | 
				
			||||||
 | 
					  (setq dap-auto-configure-features '(sessions locals breakpoints expressions controls))
 | 
				
			||||||
 | 
					  (when (executable-find "python3")
 | 
				
			||||||
 | 
					    (setq dap-python-executable "python3")))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Python debug
 | 
				
			||||||
 | 
					(use-package lsp-pyright
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :preface
 | 
				
			||||||
 | 
					  ;; Use yapf to format
 | 
				
			||||||
 | 
					  (defun lsp-pyright-format-buffer ()
 | 
				
			||||||
 | 
					    (interactive)
 | 
				
			||||||
 | 
					    (when (and (executable-find "yapf") buffer-file-name)
 | 
				
			||||||
 | 
					      (call-process "yapf" nil nil nil "-i" buffer-file-name)))
 | 
				
			||||||
 | 
					  :hook (python-mode . (lambda ()
 | 
				
			||||||
 | 
					                         (require 'lsp-pyright)
 | 
				
			||||||
 | 
					                         (add-hook 'after-save-hook #'lsp-pyright-format-buffer t t)))
 | 
				
			||||||
 | 
					  :init (when (executable-find "python3")
 | 
				
			||||||
 | 
					          (setq lsp-pyright-python-executable-cmd "python3")))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Java LSP
 | 
				
			||||||
 | 
					(use-package lsp-java
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook (java-mode . (lambda () (require 'lsp-java))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; `lsp-mode' and `treemacs' integration
 | 
				
			||||||
 | 
					(use-package lsp-treemacs
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :after lsp-mode
 | 
				
			||||||
 | 
					  :bind (:map lsp-mode-map
 | 
				
			||||||
 | 
					              ("C-<f8>" . lsp-treemacs-errors-list)
 | 
				
			||||||
 | 
					              ("M-<f8>" . lsp-treemacs-symbols)
 | 
				
			||||||
 | 
					              ("s-<f8>" . lsp-treemacs-java-deps-list))
 | 
				
			||||||
 | 
					  :init (lsp-treemacs-sync-mode 1)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (with-eval-after-load 'ace-window
 | 
				
			||||||
 | 
					    (when (boundp 'aw-ignored-buffers)
 | 
				
			||||||
 | 
					      (push 'lsp-treemacs-symbols-mode aw-ignored-buffers)
 | 
				
			||||||
 | 
					      (push 'lsp-treemacs-java-deps-mode aw-ignored-buffers))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Revisar sintaxis en vivo
 | 
				
			||||||
 | 
					(use-package flycheck
 | 
				
			||||||
 | 
					  ;; :diminish flycheck-mode
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook (prog-mode . (lambda ()
 | 
				
			||||||
 | 
					                        (unless (derived-mode-p 'makefile-mode 'js-mode)
 | 
				
			||||||
 | 
					                          (flycheck-mode))))
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Mostrar los errores de flycheck en un pop up
 | 
				
			||||||
 | 
					(use-package flycheck-popup-tip
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook (flycheck-mode . flycheck-popup-tip-mode))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'init-lsp)
 | 
				
			||||||
 | 
					;;; init-lsp.el ends here
 | 
				
			||||||
							
								
								
									
										206
									
								
								configs/init-org.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										206
									
								
								configs/init-org.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,206 @@
 | 
				
			|||||||
 | 
					;;; init-config.el --- Configuración de org-mode   -*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; 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 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-hide nil :inherit 'fixed-pitch)
 | 
				
			||||||
 | 
					  (set-face-attribute 'org-block nil :foreground 'unspecified :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")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; org-mode
 | 
				
			||||||
 | 
					(use-package org
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight (:type built-in)
 | 
				
			||||||
 | 
					  :bind (("C-c a" . org-agenda)
 | 
				
			||||||
 | 
					         ("C-c c" . org-capture))
 | 
				
			||||||
 | 
					  :hook
 | 
				
			||||||
 | 
					  (org-mode . kj/org-hook)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq company-dabbrev-ignore-case nil) ; Hacer el autocompletado case-sensitive.
 | 
				
			||||||
 | 
					  (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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Identación
 | 
				
			||||||
 | 
					  (setq org-startup-indented t)
 | 
				
			||||||
 | 
					  (setq org-src-preserve-indentation nil)
 | 
				
			||||||
 | 
					  (setq org-edit-src-content-indentation 0)
 | 
				
			||||||
 | 
					  (setq org-src-tab-acts-natively 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"))
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; 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
 | 
				
			||||||
 | 
					        '("~/Documentos/ORG/Agenda/Tareas.org")
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Archivos entre los que se moverán las tareas
 | 
				
			||||||
 | 
					  (setq org-refile-targets
 | 
				
			||||||
 | 
					        '(("Archivo.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")
 | 
				
			||||||
 | 
					          ("tt" "Tareas" entry (file+olp "~/Documentos/ORG/Agenda/Tareas.org")
 | 
				
			||||||
 | 
					           "* TODO %? \n %a\n %i" :empty-lines 1)
 | 
				
			||||||
 | 
					          ("i" "Ideas")
 | 
				
			||||||
 | 
					          ("ii" "Ideas" entry (file+olp "~/Documentos/ORG/Agenda/ideas.org")
 | 
				
			||||||
 | 
					           "* TODO %? \n %a\n %i" :empty-lines 1)
 | 
				
			||||||
 | 
					          )
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; Configuración de imágenes
 | 
				
			||||||
 | 
					  (setq org-startup-with-inline-images t) ;; Mostrar por defecto las imágenes
 | 
				
			||||||
 | 
					  (setq org-display-remote-inline-images 'cache) ;; Mostrar imágenes remotas
 | 
				
			||||||
 | 
					  (setq org-image-actual-width 512)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  (defun org-http-image-data-fn (protocol link _description)
 | 
				
			||||||
 | 
					    "Interpret LINK as an URL to an image file."
 | 
				
			||||||
 | 
					    (when (and (image-type-from-file-name link)
 | 
				
			||||||
 | 
					               (not (eq org-display-remote-inline-images 'skip)))
 | 
				
			||||||
 | 
					      (if-let (buf (url-retrieve-synchronously (concat protocol ":" link)))
 | 
				
			||||||
 | 
					          (with-current-buffer buf
 | 
				
			||||||
 | 
					            (goto-char (point-min))
 | 
				
			||||||
 | 
					            (re-search-forward "\r?\n\r?\n" nil t)
 | 
				
			||||||
 | 
					            (buffer-substring-no-properties (point) (point-max)))
 | 
				
			||||||
 | 
					        (message "Download of image \"%s\" failed" link)
 | 
				
			||||||
 | 
					        nil)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  (org-link-set-parameters "http"  :image-data-fun #'org-http-image-data-fn)
 | 
				
			||||||
 | 
					  (org-link-set-parameters "https" :image-data-fun #'org-http-image-data-fn)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  (use-package org-yt
 | 
				
			||||||
 | 
					    :straight (org-yt :type git :host github :repo "TobiasZawada/org-yt"))
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Los head "*" se ven como puntos
 | 
				
			||||||
 | 
					(use-package org-bullets
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook
 | 
				
			||||||
 | 
					  (org-mode . org-bullets-mode))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package visual-fill-column
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  ;; Tamaño de la columna
 | 
				
			||||||
 | 
					  (setq-default visual-fill-column-width 150)
 | 
				
			||||||
 | 
					  ;; Centrar el texto
 | 
				
			||||||
 | 
					  (setq-default visual-fill-column-center-text t)
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Segundo cerebro: Base de conocimientos en formato Zettelkasten
 | 
				
			||||||
 | 
					(use-package org-roam
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :ensure t
 | 
				
			||||||
 | 
					  :bind (("<f4>" . org-roam-node-insert)
 | 
				
			||||||
 | 
					         ("<f3>" . org-roam-node-find))
 | 
				
			||||||
 | 
					  :init
 | 
				
			||||||
 | 
					  (setq org-roam-v2-ack t)
 | 
				
			||||||
 | 
					  (setq org-roam-completion-system 'ivy)
 | 
				
			||||||
 | 
					  :custom
 | 
				
			||||||
 | 
					  (org-roam-directory "~/Documentos/ORG/Notas")
 | 
				
			||||||
 | 
					  (org-roam-completion-everywhere t)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (org-roam-setup))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Interface web para navegar en mi base de conocimientos.
 | 
				
			||||||
 | 
					(use-package org-roam-ui
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :ensure t
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq org-roam-ui-sync-theme t
 | 
				
			||||||
 | 
					        org-roam-ui-follow t
 | 
				
			||||||
 | 
					        org-roam-ui-update-on-save t
 | 
				
			||||||
 | 
					        org-roam-ui-open-on-start t))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Continúa el formato de la lista cuando presionas enter.
 | 
				
			||||||
 | 
					(use-package org-autolist
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :ensure t
 | 
				
			||||||
 | 
					  :hook (org-mode . org-autolist-mode))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Emojis en lugar de letras para las prioridades en org-mode.
 | 
				
			||||||
 | 
					(use-package org-fancy-priorities
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :ensure t
 | 
				
			||||||
 | 
					  :hook (org-mode . org-fancy-priorities-mode)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq org-highest-priority ?A
 | 
				
			||||||
 | 
					        org-default-priority ?B
 | 
				
			||||||
 | 
					        org-lowest-priority  ?D
 | 
				
			||||||
 | 
					        org-fancy-priorities-list '("⚡" "⬆" "⬇" "☕"))
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'init-org)
 | 
				
			||||||
 | 
					;;; init-org.el ends here
 | 
				
			||||||
							
								
								
									
										306
									
								
								configs/init-packages.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										306
									
								
								configs/init-packages.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,306 @@
 | 
				
			|||||||
 | 
					;;; init-packages.el --- Extensiones/paquetes instalados y su configuración 	-*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Mejorar M-x
 | 
				
			||||||
 | 
					(use-package amx
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :bind (("M-x" . amx)
 | 
				
			||||||
 | 
					         ("<menu>" . amx))
 | 
				
			||||||
 | 
					  :init (setq amx-history-length 20))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Iconos principalmente para ser usados por neotree
 | 
				
			||||||
 | 
					(use-package all-the-icons
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Intercamiar buffers de lugar
 | 
				
			||||||
 | 
					(use-package buffer-move
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :bind (("M-S-<up>" . buf-move-up)
 | 
				
			||||||
 | 
					         ("M-S-<down>" . buf-move-down)
 | 
				
			||||||
 | 
					         ("M-S-<left>" . buf-move-left)
 | 
				
			||||||
 | 
					         ("M-S-<right>" . buf-move-right))
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Seleccionar por regiones (similar a mark-sexp, pero toma en cuenta hacia atrás del cursor también)
 | 
				
			||||||
 | 
					(use-package expand-region
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :bind ("C-+" . er/expand-region))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Major mode para archivos CSV
 | 
				
			||||||
 | 
					(use-package csv-mode
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :hook ((csv-mode . csv-align-mode)
 | 
				
			||||||
 | 
					         (csv-mode . csv-header-line))
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Un bonito y sencillo panel de inicio
 | 
				
			||||||
 | 
					(use-package dashboard
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (dashboard-setup-startup-hook)
 | 
				
			||||||
 | 
					  (setq dashboard-set-file-icons t
 | 
				
			||||||
 | 
					        dashboard-set-heading-icons t
 | 
				
			||||||
 | 
					        dashboard-set-file-icons t
 | 
				
			||||||
 | 
					        dashboard-week-agenda nil
 | 
				
			||||||
 | 
					        dashboard-agenda-time-string-format "%Y-%m-%d %H:%M")
 | 
				
			||||||
 | 
					  (setq dashboard-startup-banner
 | 
				
			||||||
 | 
					        (expand-file-name "duck-small.png" user-emacs-directory))
 | 
				
			||||||
 | 
					  (setq dashboard-items '(
 | 
				
			||||||
 | 
					                          (agenda . 10)
 | 
				
			||||||
 | 
					                          ;;(recents . 10)
 | 
				
			||||||
 | 
					                          ))
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Mover líneas o regiones
 | 
				
			||||||
 | 
					(use-package drag-stuff
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook
 | 
				
			||||||
 | 
					  (after-init . drag-stuff-global-mode)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (drag-stuff-define-keys))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; La línea bonita esa de abajo
 | 
				
			||||||
 | 
					(use-package doom-modeline
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :ensure t
 | 
				
			||||||
 | 
					  :hook (after-init . doom-modeline-mode)
 | 
				
			||||||
 | 
					  :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))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Emparejamiento automático de comillas, paréntesis, corchetes y llaves
 | 
				
			||||||
 | 
					(use-package electric-pair
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight (:type built-in)
 | 
				
			||||||
 | 
					  :hook (after-init . electric-pair-mode)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq electric-pair-delete-adjacent-pairs nil))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Git Gutter - Marca a la izq. si una linea ha sido agregada, editada o eliminada desde el último commit.
 | 
				
			||||||
 | 
					(use-package git-gutter
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook
 | 
				
			||||||
 | 
					  (after-init . global-git-gutter-mode))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package highlight-escape-sequences
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :hook (prog-mode . hes-mode)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq hes-mode-alist
 | 
				
			||||||
 | 
					        `((c-mode                . ,hes-c/c++/objc-escape-sequence-re)
 | 
				
			||||||
 | 
					          (c++-mode              . ,hes-c/c++/objc-escape-sequence-re)
 | 
				
			||||||
 | 
					          (objc-mode             . ,hes-c/c++/objc-escape-sequence-re)
 | 
				
			||||||
 | 
					          (go-mode               . ,hes-c/c++/objc-escape-sequence-re)
 | 
				
			||||||
 | 
					          (php-mode              . ,hes-c/c++/objc-escape-sequence-re)
 | 
				
			||||||
 | 
					          (java-mode             . ,hes-java-escape-sequence-re)
 | 
				
			||||||
 | 
					          (clojure-mode          . ,hes-java-escape-sequence-re)
 | 
				
			||||||
 | 
					          (js-mode               . ,hes-js-escape-sequence-re)
 | 
				
			||||||
 | 
					          (js2-mode              . ,hes-js-escape-sequence-re)
 | 
				
			||||||
 | 
					          (ruby-mode             . ,hes-ruby-escape-sequence-keywords)
 | 
				
			||||||
 | 
					          (lisp-mode             . ,hes-elisp-escape-sequence-re)
 | 
				
			||||||
 | 
					          (lisp-interaction-mode . ,hes-elisp-escape-sequence-re)
 | 
				
			||||||
 | 
					          (emacs-lisp-mode       . ,hes-elisp-escape-sequence-re))
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Mostrar lo que se está presionando en pantalla
 | 
				
			||||||
 | 
					(use-package keypression
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq keypression-use-child-frame t
 | 
				
			||||||
 | 
					      keypression-fade-out-delay 1.0
 | 
				
			||||||
 | 
					      keypression-frame-justify 'keypression-left-justified
 | 
				
			||||||
 | 
					      keypression-cast-command-name t
 | 
				
			||||||
 | 
					      keypression-cast-command-name-format "%s  %s"
 | 
				
			||||||
 | 
					      keypression-combine-same-keystrokes t
 | 
				
			||||||
 | 
					      keypression-x-offset 50
 | 
				
			||||||
 | 
					      keypression-y-offset 100
 | 
				
			||||||
 | 
					      keypression-font-face-attribute '(:width normal :height 180 :weight bold))
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Generador automatizado de archivos de licencia
 | 
				
			||||||
 | 
					(use-package license-templates
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :defer t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Magia para git
 | 
				
			||||||
 | 
					(use-package magit
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Modo markdown
 | 
				
			||||||
 | 
					(use-package markdown-mode
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Multiple vterm
 | 
				
			||||||
 | 
					(use-package multi-vterm
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :bind* (("C-x tt" . multi-vterm-dedicated-toggle)
 | 
				
			||||||
 | 
					          ("C-x tf" . multi-vterm)
 | 
				
			||||||
 | 
					          ("C-x tp" . multi-vterm-project)
 | 
				
			||||||
 | 
					          ;;("<tab>" . vterm-send-tab)
 | 
				
			||||||
 | 
					          )
 | 
				
			||||||
 | 
					  :ensure t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Mecanografía
 | 
				
			||||||
 | 
					(use-package speed-type
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :diminish
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq speed-type-gb-book-list '(66867 66866 66591 57303)
 | 
				
			||||||
 | 
					        speed-type-min-chars 500
 | 
				
			||||||
 | 
					        speed-type-max-chars 600))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Paquete para manejo de proyectos
 | 
				
			||||||
 | 
					(use-package projectile
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :bind ("C-c p" . projectile-command-map)
 | 
				
			||||||
 | 
					  :diminish projectile-mode
 | 
				
			||||||
 | 
					  :custom ((projectile-completion-system 'ivy))
 | 
				
			||||||
 | 
					  :init
 | 
				
			||||||
 | 
					  (setq projectile-mode-line-prefix ""
 | 
				
			||||||
 | 
					        projectile-sort-order 'recentf
 | 
				
			||||||
 | 
					        projectile-use-git-grep t)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  ;; 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 inicio).
 | 
				
			||||||
 | 
					  (when (file-directory-p "~/Proyectos")
 | 
				
			||||||
 | 
					    (setq projectile-project-search-path '("~/Proyectos")))
 | 
				
			||||||
 | 
					  (when (file-directory-p "~/mnt/Nginx")
 | 
				
			||||||
 | 
					    (setq projectile-project-search-path (append
 | 
				
			||||||
 | 
					                                          projectile-project-search-path
 | 
				
			||||||
 | 
					                                          '("~/mnt/Nginx"))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  ;; 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")
 | 
				
			||||||
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  (defun projectile-desktop-save-hook ()
 | 
				
			||||||
 | 
					    "Nombres de los archivos de desktop-save según el nombre del proyecto."
 | 
				
			||||||
 | 
					    (setq desktop-hash
 | 
				
			||||||
 | 
					          (secure-hash 'md5 (concat (projectile-project-root))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    (setq
 | 
				
			||||||
 | 
					     desktop-base-file-name (concat ".emacs-" desktop-hash ".desktop")
 | 
				
			||||||
 | 
					     desktop-base-lock-name (concat ".emacs-" desktop-hash ".desktop" ".lock"))
 | 
				
			||||||
 | 
					    )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  (add-hook 'projectile-after-switch-project-hook #'projectile-desktop-save-hook)
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Recentf - Guarda registro de los archivos abiertos recientemente
 | 
				
			||||||
 | 
					(use-package recentf
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :bind ("C-x C-r" . recentf-open-files)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq recentf-save-file
 | 
				
			||||||
 | 
					        (recentf-expand-file-name (concat temp-dir "/recentf")))
 | 
				
			||||||
 | 
					  (recentf-mode 1))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Busqueda rápida con ripgrep
 | 
				
			||||||
 | 
					(use-package rg
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :defines projectile-command-map
 | 
				
			||||||
 | 
					  :hook (after-init . rg-enable-default-bindings)
 | 
				
			||||||
 | 
					  :bind (:map rg-global-map
 | 
				
			||||||
 | 
					         ("c" . rg-dwim-current-dir)
 | 
				
			||||||
 | 
					         ("f" . rg-dwim-current-file)
 | 
				
			||||||
 | 
					         ("m" . rg-menu))
 | 
				
			||||||
 | 
					  :init (setq rg-group-result t
 | 
				
			||||||
 | 
					              rg-show-columns t)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (cl-pushnew '("tmpl" . "*.tmpl") rg-custom-type-aliases)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  (with-eval-after-load 'projectile
 | 
				
			||||||
 | 
					    (bind-key "s R" #'rg-project projectile-command-map)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Guardar la posición del cursor en un archivo para volver allí cuando se lo vuelva a abrir.
 | 
				
			||||||
 | 
					(use-package saveplace
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook (after-init . save-place-mode)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq save-place-file (locate-user-emacs-file (concat temp-dir "/places"))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Mejorando el scroll
 | 
				
			||||||
 | 
					(use-package smooth-scrolling
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook (after-init . smooth-scrolling-mode)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (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)
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Paquete para crear imágens (solo lo uso para sacar capturas SVG de emacs)
 | 
				
			||||||
 | 
					(use-package silicon
 | 
				
			||||||
 | 
					  :ensure t
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight (silicon :type git :host github :repo "iensu/silicon-el"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Cuando presionas enter en un bloque de comentario sigue el estilo del bloque.
 | 
				
			||||||
 | 
					(use-package vs-comment-return
 | 
				
			||||||
 | 
					  :straight (vs-comment-return :type git :host github :repo "emacs-vs/vs-comment-return")
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :hook (prog-mode . vs-comment-return-mode)
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Terminal
 | 
				
			||||||
 | 
					(use-package vterm :ensure t :defer t :straight t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Cuando iniicias un atajo de teclas te muestra las posibilidades
 | 
				
			||||||
 | 
					(use-package which-key
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook (after-init . which-key-mode))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Restaurar el estado de los frames
 | 
				
			||||||
 | 
					(use-package winner
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :hook (after-init . winner-mode))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Emacs Start Up Profiler
 | 
				
			||||||
 | 
					;; (use-package esup
 | 
				
			||||||
 | 
					;;   :ensure t
 | 
				
			||||||
 | 
					;;   :straight t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'init-packages)
 | 
				
			||||||
 | 
					;;; init-packages.el ends here
 | 
				
			||||||
							
								
								
									
										60
									
								
								configs/init-treemacs.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										60
									
								
								configs/init-treemacs.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,60 @@
 | 
				
			|||||||
 | 
					;;; init-treemacs.el --- Extensiones/paquetes instalados y su configuración 	-*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package treemacs
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :commands (treemacs-follow-mode
 | 
				
			||||||
 | 
					             treemacs-filewatch-mode
 | 
				
			||||||
 | 
					             treemacs-fringe-indicator-mode
 | 
				
			||||||
 | 
					             treemacs-git-mode)
 | 
				
			||||||
 | 
					  :custom-face
 | 
				
			||||||
 | 
					  (cfrs-border-color ((t (:background ,(face-foreground 'font-lock-comment-face nil t)))))
 | 
				
			||||||
 | 
					  :bind (([f9]        . treemacs)
 | 
				
			||||||
 | 
					         ([f8]        . treemacs-display-current-project-exclusively)
 | 
				
			||||||
 | 
					         ("C-x t 1"   . treemacs-delete-other-windows)
 | 
				
			||||||
 | 
					         ("C-x t b"   . treemacs-bookmark)
 | 
				
			||||||
 | 
					         :map treemacs-mode-map
 | 
				
			||||||
 | 
					         ([mouse-1]   . treemacs-single-click-expand-action))
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq treemacs-collapse-dirs           (if treemacs-python-executable 3 0)
 | 
				
			||||||
 | 
					        treemacs-missing-project-action  'remove
 | 
				
			||||||
 | 
					        treemacs-sorting                 'alphabetic-asc
 | 
				
			||||||
 | 
					        treemacs-follow-after-init       t
 | 
				
			||||||
 | 
					        treemacs-width                   30)
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (treemacs-follow-mode t)
 | 
				
			||||||
 | 
					  (treemacs-filewatch-mode t)
 | 
				
			||||||
 | 
					  (pcase (cons (not (null (executable-find "git")))
 | 
				
			||||||
 | 
					               (not (null (executable-find "python3"))))
 | 
				
			||||||
 | 
					    (`(t . t)
 | 
				
			||||||
 | 
					     (treemacs-git-mode 'deferred))
 | 
				
			||||||
 | 
					    (`(t . _)
 | 
				
			||||||
 | 
					     (treemacs-git-mode 'simple))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package treemacs-projectile
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :after projectile
 | 
				
			||||||
 | 
					  :bind (:map projectile-command-map
 | 
				
			||||||
 | 
					              ("h" . treemacs-projectile)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package treemacs-magit
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :after magit
 | 
				
			||||||
 | 
					  :commands treemacs-magit--schedule-update
 | 
				
			||||||
 | 
					  :hook ((magit-post-commit
 | 
				
			||||||
 | 
					          git-commit-post-finish
 | 
				
			||||||
 | 
					          magit-post-stage
 | 
				
			||||||
 | 
					          magit-post-unstage)
 | 
				
			||||||
 | 
					         . treemacs-magit--schedule-update))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'init-treemacs)
 | 
				
			||||||
 | 
					;;; init-treemacs.el ends here
 | 
				
			||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
;;; lang-go.el --- Configuración para el lenguaje go
 | 
					;;; lang-go.el --- Configuración para el lenguaje go 	-*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Author: kj <webmaster@outcontrol.net>
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
@@ -8,6 +8,7 @@
 | 
				
			|||||||
;;; Code:
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(use-package go-mode
 | 
					(use-package go-mode
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
  :defer t)
 | 
					  :defer t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(provide 'lang-go)
 | 
					(provide 'lang-go)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										31
									
								
								configs/lang-html.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								configs/lang-html.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,31 @@
 | 
				
			|||||||
 | 
					;;; lang-html.el --- Configuración para el lenguaje PHP 	-*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package web-mode
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq web-mode-markup-indent-offset 2
 | 
				
			||||||
 | 
					        web-mode-css-indent-offset 2
 | 
				
			||||||
 | 
					        web-mode-code-indent-offset 2
 | 
				
			||||||
 | 
					        web-mode-enable-current-element-highlight t
 | 
				
			||||||
 | 
					        web-mode-enable-current-column-highlight t)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package auto-rename-tag
 | 
				
			||||||
 | 
					  :straight t (auto-rename-tag :type git :host github :repo "jcs-elpa/auto-rename-tag")
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :hook ((html-mode . auto-rename-tag-mode)
 | 
				
			||||||
 | 
					         (web-mode  . auto-rename-tag-mode))
 | 
				
			||||||
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'lang-html)
 | 
				
			||||||
 | 
					;;; lang-html.el ends here
 | 
				
			||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
;;; lang-js.el --- Configuración para el lenguaje Javascript
 | 
					;;; lang-js.el --- Configuración para el lenguaje Javascript 	-*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Author: kj <webmaster@outcontrol.net>
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
@@ -9,14 +9,18 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
(use-package js
 | 
					(use-package js
 | 
				
			||||||
  :defer t
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
  :mode
 | 
					  :mode
 | 
				
			||||||
  ("\\.js$" . js-mode)
 | 
					  ("\\.js$" . js-mode)
 | 
				
			||||||
 | 
					  :hook
 | 
				
			||||||
 | 
					  (js-mode . eglot-ensure)
 | 
				
			||||||
  :config
 | 
					  :config
 | 
				
			||||||
  (setq js-indent-level 2))
 | 
					  (setq js-indent-level 2))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; json-mode
 | 
					;; json-mode
 | 
				
			||||||
(use-package json-mode
 | 
					(use-package json-mode
 | 
				
			||||||
  :defer t
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
  :ensure t
 | 
					  :ensure t
 | 
				
			||||||
  :mode
 | 
					  :mode
 | 
				
			||||||
  ("\\.json$" . json-mode)
 | 
					  ("\\.json$" . json-mode)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
;;; lang-php.el --- Configuración para el lenguaje PHP
 | 
					;;; lang-php.el --- Configuración para el lenguaje PHP 	-*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Author: kj <webmaster@outcontrol.net>
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
@@ -7,23 +7,19 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
;;; Code:
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(use-package company-php :defer t)
 | 
					 | 
				
			||||||
(use-package ac-php :defer t)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(use-package php-mode
 | 
					(use-package php-mode
 | 
				
			||||||
  :defer t
 | 
					  :defer t
 | 
				
			||||||
  :bind ("<C-tab>" . php-doc-block)
 | 
					  :straight t
 | 
				
			||||||
  :config
 | 
					  :hook ((php-mode .  (lambda ()
 | 
				
			||||||
  (add-hook 'php-mode-hook #'(lambda()
 | 
					                       (local-set-key (kbd "C-c d b") 'php-doc-block) ;; atajo para docblock
 | 
				
			||||||
                               (php-enable-default-coding-style)
 | 
					                       (company-mode t) ; habilita company mode
 | 
				
			||||||
                               (company-mode t) ; habilita company mode
 | 
					                       ))
 | 
				
			||||||
                               (ac-php-core-eldoc-setup) ; habilita soporte para ELDoc
 | 
					         ;; (php-mode . lsp)
 | 
				
			||||||
                               (add-to-list 'company-backends 'company-ac-php-backend) ; Agregar ac-php para a company
 | 
					         )
 | 
				
			||||||
                               ))
 | 
					 | 
				
			||||||
  )
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(use-package php-doc-block
 | 
					(use-package php-doc-block
 | 
				
			||||||
  :load-path (lambda() (concat private-dir "/packages/php-doc-block"))
 | 
					  :straight (php-doc-block :type git :host github :repo "moskalyovd/emacs-php-doc-block")
 | 
				
			||||||
  )
 | 
					  )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(provide 'lang-php)
 | 
					(provide 'lang-php)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										29
									
								
								configs/lang-rust.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								configs/lang-rust.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,29 @@
 | 
				
			|||||||
 | 
					;;; lang-rust.el --- Configuración para el lenguaje PHP  -*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(use-package rust-mode
 | 
				
			||||||
 | 
					  :defer t
 | 
				
			||||||
 | 
					  :straight t
 | 
				
			||||||
 | 
					  :ensure t
 | 
				
			||||||
 | 
					  :config
 | 
				
			||||||
 | 
					  (setq rust-format-on-save t))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Rustic es necesario solamente si se usa lsp-mode + flycheck.
 | 
				
			||||||
 | 
					;; (use-package rustic
 | 
				
			||||||
 | 
					;;   :defer t
 | 
				
			||||||
 | 
					;;   :straight t
 | 
				
			||||||
 | 
					;;   :ensure t
 | 
				
			||||||
 | 
					;;   :config
 | 
				
			||||||
 | 
					;;   ;;(setq rustic-lsp-server 'rls)
 | 
				
			||||||
 | 
					;;   (setq rustic-lsp-client 'lsp)
 | 
				
			||||||
 | 
					;;   ;;(setq rustic-lsp-client nil)
 | 
				
			||||||
 | 
					;;   (push 'rustic-clippy flycheck-checkers))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					(provide 'lang-rust)
 | 
				
			||||||
 | 
					;;; lang-rust.el ends here
 | 
				
			||||||
							
								
								
									
										48
									
								
								early-init.el
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										48
									
								
								early-init.el
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,48 @@
 | 
				
			|||||||
 | 
					;;; early-init.el --- Early startup code -*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Copyright (C) 2021 Ryan C. Thompson
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Filename: early-init.el
 | 
				
			||||||
 | 
					;; Author: Ryan C. Thompson
 | 
				
			||||||
 | 
					;; Created: Sat Nov 27 13:40:59 2021 (-0500)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; This file is NOT part of GNU Emacs.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 | 
				
			||||||
 | 
					;;
 | 
				
			||||||
 | 
					;;; Commentary:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; This file contains code that must be executed early during Emacs'
 | 
				
			||||||
 | 
					;; startup for proper initialization, as described here:
 | 
				
			||||||
 | 
					;; https://www.gnu.org/software/emacs/manual/html_node/emacs/Early-Init-File.html
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 | 
				
			||||||
 | 
					;;
 | 
				
			||||||
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Disable GC during init
 | 
				
			||||||
 | 
					(put 'gc-cons-percentage 'original-value-before-init gc-cons-percentage)
 | 
				
			||||||
 | 
					(put 'gc-cons-percentage 'value-during-init 0.6)
 | 
				
			||||||
 | 
					(defun restore-gc-cons-percentage-after-init ()
 | 
				
			||||||
 | 
					  (let ((expected-value (get 'gc-cons-percentage 'value-during-init))
 | 
				
			||||||
 | 
					        (value-to-restore (get 'gc-cons-percentage 'original-value-before-init)))
 | 
				
			||||||
 | 
					    (when (and value-to-restore (equal gc-cons-percentage expected-value))
 | 
				
			||||||
 | 
					      (message "Setting `gc-cons-percentage' back to starting value %s" value-to-restore)
 | 
				
			||||||
 | 
					      (setq gc-cons-percentage value-to-restore))))
 | 
				
			||||||
 | 
					(add-hook 'after-init-hook #'restore-gc-cons-percentage-after-init)
 | 
				
			||||||
 | 
					(setq gc-cons-percentage (get 'gc-cons-percentage 'value-during-init))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Permitir solo la búsqueda de archivos a cargar en la config en case sensitive.
 | 
				
			||||||
 | 
					(setq auto-mode-case-fold nil)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Iniciar emacs maximizado
 | 
				
			||||||
 | 
					(add-to-list 'initial-frame-alist '(fullscreen . maximized)) ; frame inicial
 | 
				
			||||||
 | 
					;; (add-to-list 'default-frame-alist '(fullscreen . maximized)) ; Cada frame
 | 
				
			||||||
 | 
					;; (add-hook 'window-setup-hook 'toggle-frame-maximized t) ; Hacerlo mediante window-setup-hook (se maximiza al terminar de cargar la ventana)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Recommended by
 | 
				
			||||||
 | 
					;; https://github.com/raxod502/straight.el#getting-started to prevent
 | 
				
			||||||
 | 
					;; pacakge.el stepping on straight's toes.
 | 
				
			||||||
 | 
					(setq package-enable-at-startup nil)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;;; early-init.el ends here
 | 
				
			||||||
@@ -1,21 +0,0 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# start emacs server if not is running
 | 
					 | 
				
			||||||
systemctl --user status emacs > /dev/null 2>&1 || systemctl --user start emacs > /dev/null 2>&1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# if args is -nw or -t run on terminal
 | 
					 | 
				
			||||||
if [ "$1" == "-t" ] || [ "$1" == "-nw" ]; then
 | 
					 | 
				
			||||||
    emacsclient -t
 | 
					 | 
				
			||||||
    exit
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# if no args open new frame
 | 
					 | 
				
			||||||
if [ $# -eq 0 ]; then
 | 
					 | 
				
			||||||
    emacsclient -c -n
 | 
					 | 
				
			||||||
    emacsclient --eval "(progn (select-frame-set-input-focus (selected-frame)))"
 | 
					 | 
				
			||||||
    exit
 | 
					 | 
				
			||||||
fi
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
emacsclient -e "(frames-on-display-list \"$DISPLAY\")" &>/dev/null
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
emacsclient -c -n "$*"
 | 
					 | 
				
			||||||
							
								
								
									
										24
									
								
								init.el
									
									
									
									
									
								
							
							
						
						
									
										24
									
								
								init.el
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
				
			|||||||
;;; init.el --- Init de emacs ordenado
 | 
					;;; init.el --- Init de emacs ordenado -*- lexical-binding: t -*-
 | 
				
			||||||
 | 
					
 | 
				
			||||||
;; Author: kj <webmaster@outcontrol.net>
 | 
					;; Author: kj <webmaster@outcontrol.net>
 | 
				
			||||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
					;; URL: https://git.kj2.me/kj/confi-emacs-actual
 | 
				
			||||||
@@ -9,16 +9,30 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
;;; Code:
 | 
					;;; Code:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Cargar configuraciones
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(add-to-list 'load-path (concat user-emacs-directory "configs"))
 | 
					(add-to-list 'load-path (concat user-emacs-directory "configs"))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(require 'base)
 | 
					;; Paquetes base
 | 
				
			||||||
(require 'base-extensions)
 | 
					(require 'init-base)
 | 
				
			||||||
(require 'base-functions)
 | 
					(require 'init-packages)
 | 
				
			||||||
(require 'base-keys)
 | 
					(require 'init-functions)
 | 
				
			||||||
 | 
					(require 'init-org)
 | 
				
			||||||
 | 
					;; (require 'init-lsp)
 | 
				
			||||||
 | 
					(require 'init-eglot)
 | 
				
			||||||
 | 
					(require 'init-company)
 | 
				
			||||||
 | 
					(require 'init-treemacs)
 | 
				
			||||||
 | 
					;;(require 'init-ctags)
 | 
				
			||||||
 | 
					(require 'init-ivy)
 | 
				
			||||||
 | 
					;; (require 'init-evil)
 | 
				
			||||||
 | 
					(require 'init-keys)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					;; Lenguajes
 | 
				
			||||||
(require 'lang-php)
 | 
					(require 'lang-php)
 | 
				
			||||||
(require 'lang-js)
 | 
					(require 'lang-js)
 | 
				
			||||||
(require 'lang-go)
 | 
					(require 'lang-go)
 | 
				
			||||||
 | 
					(require 'lang-rust)
 | 
				
			||||||
 | 
					(require 'lang-html)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(provide 'init)
 | 
					(provide 'init)
 | 
				
			||||||
;;; init.el ends here
 | 
					;;; init.el ends here
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,120 +0,0 @@
 | 
				
			|||||||
;;; php-doc-block.el --- Php DocBlock generator
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Copyright (C) 2016 Dmitriy Moskalyov
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Author: Dmitriy Moskalyov <moskalyovd@gmail.com>
 | 
					 | 
				
			||||||
;; Keywords: php docblock
 | 
					 | 
				
			||||||
;; Version: 0.0.1
 | 
					 | 
				
			||||||
;; URL: https://github.com/moskalyovd/emacs-php-doc-block
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; This program is free software: you can redistribute it and/or modify
 | 
					 | 
				
			||||||
;; it under the terms of the GNU General Public License as published by
 | 
					 | 
				
			||||||
;; the Free Software Foundation, either version 3 of the License, or
 | 
					 | 
				
			||||||
;; (at your option) any later version.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; This program is distributed in the hope that it will be useful,
 | 
					 | 
				
			||||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
					 | 
				
			||||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
					 | 
				
			||||||
;; GNU General Public License for more details.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; You should have received a copy of the GNU General Public License
 | 
					 | 
				
			||||||
;; along with this program.  If not, see <http://www.gnu.org/licenses/>.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;;; Commentary:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; This package provides php DocBlock generator.
 | 
					 | 
				
			||||||
;; How to use:
 | 
					 | 
				
			||||||
;; Clone repository from https://github.com/moskalyovd/emacs-php-doc-block
 | 
					 | 
				
			||||||
;; and add to your .emacs(or init.el) file:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; (add-to-list 'load-path "~/.emacs.d/emacs-php-doc-block")
 | 
					 | 
				
			||||||
;; (require 'php-doc-block)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; Then bind command 'php-doc-block to any key you like:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;; (add-hook 'php-mode-hook
 | 
					 | 
				
			||||||
;;          (lambda ()
 | 
					 | 
				
			||||||
;;              (local-set-key (kbd "<C-tab>") 'php-doc-block)))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
;;; Code:
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun insert-to-prev-line-and-indent (text)
 | 
					 | 
				
			||||||
  "Insert TEXT to the previous line with indentation."
 | 
					 | 
				
			||||||
  (beginning-of-line)
 | 
					 | 
				
			||||||
  (open-line 1)
 | 
					 | 
				
			||||||
  (insert text)
 | 
					 | 
				
			||||||
  (indent-according-to-mode))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun insert-to-next-line-and-indent (text)
 | 
					 | 
				
			||||||
  "Insert TEXT to the next line with indentation."
 | 
					 | 
				
			||||||
  (end-of-line)
 | 
					 | 
				
			||||||
  (newline-and-indent)
 | 
					 | 
				
			||||||
  (insert text)
 | 
					 | 
				
			||||||
  (indent-according-to-mode))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun php-doc-block-var-or-attr (tag-type type name value is-nullable)
 | 
					 | 
				
			||||||
  "Insert doc block for a property or an attribute"
 | 
					 | 
				
			||||||
  (cond
 | 
					 | 
				
			||||||
   ((and value (= (string-width type) 0))
 | 
					 | 
				
			||||||
    (cond
 | 
					 | 
				
			||||||
     ((string-match "^=\s*\\(array(.*)\\|\\[\.*\]\\)" value) (setq type "array"))
 | 
					 | 
				
			||||||
     ((string-match "^=\s*\[0-9\]*\\.\[0-9\]+$" value)  (setq type "float"))
 | 
					 | 
				
			||||||
     ((string-match "^=\s*\[0-9\]+$" value) (setq type "int"))
 | 
					 | 
				
			||||||
     ((string-match "^=\s*\['\"]" value) (setq type "string"))
 | 
					 | 
				
			||||||
     ((string-match "^=\s*\\(true\\|false\\)" value) (setq type "bool"))))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
   ((and (= (string-width type) 0) (not value))
 | 
					 | 
				
			||||||
    (setq type "mixed")))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  (when (equal is-nullable "?")
 | 
					 | 
				
			||||||
    (setq type (concat type "|null")))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  (insert-to-next-line-and-indent (concat "* @" tag-type " " type  " " name)))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun php-doc-block-function (name arguments return-type is-return-nullable)
 | 
					 | 
				
			||||||
  "Insert php docblock for function"
 | 
					 | 
				
			||||||
  (insert-to-next-line-and-indent (concat "* " name))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  (when (> (string-width arguments) 0)
 | 
					 | 
				
			||||||
    (insert-to-next-line-and-indent "*")
 | 
					 | 
				
			||||||
    (dolist (arg (split-string arguments "\s*,\s*"))
 | 
					 | 
				
			||||||
      (string-match "\s*\\(\[\?\]?\\)\s*\\(\[\\\]?\[a-zA-Z0-9_\]*\\)?\s*\\($\[a-zA-Z0-9_\]+\\)\s*\\(=.*\\)?" arg)
 | 
					 | 
				
			||||||
      (php-doc-block-var-or-attr "param" (match-string 2 arg) (match-string 3 arg) (match-string 4 arg) (match-string 1 arg))))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  (when (> (string-width return-type) 0)
 | 
					 | 
				
			||||||
    (insert-to-next-line-and-indent "*")
 | 
					 | 
				
			||||||
    (when (equal is-return-nullable "?")
 | 
					 | 
				
			||||||
      (setq return-type (concat return-type "|null")))
 | 
					 | 
				
			||||||
    (insert-to-next-line-and-indent (concat "* @return " return-type))))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun php-doc-block-class (type name)
 | 
					 | 
				
			||||||
  "Insert php doc block for class, interface etc."
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  (insert-to-next-line-and-indent (concat "* " name " " type)))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(defun php-doc-block ()
 | 
					 | 
				
			||||||
  "Insert php docblock."
 | 
					 | 
				
			||||||
  (interactive)
 | 
					 | 
				
			||||||
  (let ((line (thing-at-point 'line)))
 | 
					 | 
				
			||||||
    (insert-to-prev-line-and-indent "/**")
 | 
					 | 
				
			||||||
    (cond
 | 
					 | 
				
			||||||
     ((string-match "function\s*" line)
 | 
					 | 
				
			||||||
      (beginning-of-line)
 | 
					 | 
				
			||||||
      (let ((line (thing-at-point 'line)) (func-defun "") (s-point (point)) (e-point (re-search-forward ";\\|{" nil '(nil))))
 | 
					 | 
				
			||||||
        (goto-char s-point)
 | 
					 | 
				
			||||||
        (if e-point
 | 
					 | 
				
			||||||
            (setq func-defun (replace-regexp-in-string "{\\|\n" "" (buffer-substring s-point e-point)))
 | 
					 | 
				
			||||||
          (progn
 | 
					 | 
				
			||||||
            (end-of-line)
 | 
					 | 
				
			||||||
            (setq func-defun (buffer-substring s-point (point))))
 | 
					 | 
				
			||||||
          )
 | 
					 | 
				
			||||||
        (when (string-match "function\s+\\([A-Za-z0-9_]+\\)\s*(\\(.*\\))\s*:*\s*\\(\[\?\]?\\)\s*\\(\[A-Za-z0-9_\\\]*\\)" func-defun)
 | 
					 | 
				
			||||||
          (php-doc-block-function (match-string 1 func-defun) (match-string 2 func-defun) (match-string 4 func-defun) (match-string 3 func-defun)))))
 | 
					 | 
				
			||||||
     ((string-match "\s*\\([a-zA-Z0-9_]+\\)?\s*\\($\[a-zA-Z0-9_\]+\\)\s*\\(=\[^;\]*\\)?" line)
 | 
					 | 
				
			||||||
      (php-doc-block-var-or-attr "var" "" (match-string 2 line) (match-string 3 line) ""))
 | 
					 | 
				
			||||||
     ((string-match "\\(class\\|interface\\|trait\\|abstract class\\)\s+\\(\[a-zA-Z0-9_\]+\\)" line)
 | 
					 | 
				
			||||||
      (php-doc-block-class (match-string 1 line) (match-string 2 line))))
 | 
					 | 
				
			||||||
    (insert-to-next-line-and-indent "*/")))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
(provide 'php-doc-block)
 | 
					 | 
				
			||||||
;;; php-doc-block.el ends here
 | 
					 | 
				
			||||||
							
								
								
									
										34
									
								
								readme.md
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								readme.md
									
									
									
									
									
								
							@@ -18,9 +18,23 @@ Al igual que la versión anterior, puede ser necesario ejecutar el siguiente com
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Y eso sería todo.
 | 
					Y eso sería todo.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Dependencias espefícicas
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Algunos lenguajes, pueden requerir que instales algunas cosas en específico.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- *Javascript*: Necesita de al menos [deno](https://deno.land/) para LSP (eglot) y [node](https://nodejs.org/es/) para flycheck, aunque creo que con deno puede bastar para ambos.
 | 
				
			||||||
 | 
					- *PHP*: Requiere instalar [phpactor](https://phpactor.readthedocs.io/en/master/usage/standalone.html) para el LSP.
 | 
				
			||||||
 | 
					- *GO*: Necesita etener instalado [go](https://go.dev/) para linter (gofmt) y [gopls](https://github.com/golang/tools/tree/master/gopls) para LSP.
 | 
				
			||||||
 | 
					- *Rust*: Necesita clippy para flycheck y LSP. Pare este útimo igual es posible usar [rust-analyzer](https://rust-analyzer.github.io).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Otros:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Búsqueda: Requiere tener instalado ripgrep.
 | 
				
			||||||
 | 
					- Capturas: Requiere silicon para las capturas con silico y que la compilación sea con cairo para las capturas SVG.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Usar el modo daemon
 | 
					## Usar el modo daemon
 | 
				
			||||||
 | 
					
 | 
				
			||||||
El modo daemon permite a emacs cargar mucho más rápido, puesto que con ello evitas volver a cargar la configuración cada vez que abres un nuevo archivo. Si quieres aprender mas sobre esto, puedes revisarlo en la [dococumentación de emacs](https://www.emacswiki.org/emacs/EmacsAsDaemon).
 | 
					El modo daemon permite a emacs cargar mucho más rápido, puesto que con ello evitas volver a cargar la configuración cada vez que abres un nuevo archivo. Si quieres aprender mas sobre esto, puedes revisarlo en la [documentación de emacs](https://www.emacswiki.org/emacs/EmacsAsDaemon).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Para iniciar el daemon, puedes hacerlo desde la terminal ejecutando:
 | 
					Para iniciar el daemon, puedes hacerlo desde la terminal ejecutando:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -30,26 +44,18 @@ Del mismo modo, igual es recomendable habilitar el autoinicio de este servicio j
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
`sudo systemctl --user enable emacs`
 | 
					`sudo systemctl --user enable emacs`
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Finalmente, para abrirlo, es necesaria la usar `emacsclient` en lugar de `emacs`, para hacer que eso suceda en todo el sistema se puede realizar el siguiente hack copiando el archivo `emacs-client-runner.sh` a `/usr/local/bin/` con el nombre `emacs` de la siguiente manera:
 | 
					Y abrir emacs mediante emacsclient.
 | 
				
			||||||
 | 
					 | 
				
			||||||
`sudo cp ~/.emacs.d/emacs-client-runner.sh /usr/local/bin/emacs`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
**🔴 Advertencia:** Esto reemplazará emacs por emacsclient, si deseas usar emacs podrás hacerlo mediante: `/bin/emacs`
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
**Extra:** Con este hack, para abrir emacs en modo terminal puedes ejecutar: `emacsclient -t`, `emacs -t` o `emacs -nw`.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Consideraciones
 | 
					## Consideraciones
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Toda la configuración la he realizado en los archivos que están en los archivos de la carpeta config, el archivo `init.el` solo los llama y no guarda nada más aparte de eso.
 | 
					- Toda la configuración la he realizado en los archivos que están en los archivos de la carpeta config, el archivo `init.el` solo los llama y no guarda nada más aparte de eso.
 | 
				
			||||||
- Puede tener activado `evil-mode` (A veces lo activo, pues quiero terminar usándolo siempre), por lo que si no lo quieres tener, recomiendo comentar la línea que lo activa (`(evil-mode 1)`) o directamente toda la sección en `base-extensions.el` que cofigura evil.
 | 
					 | 
				
			||||||
- Se puede activar/desactivar `cua-mode` (`configs/base.el`, línea 49) activado para poder copiar, cortar, pegar y deshacer cambios con las combinaciones típicas en lugar de las de emacs.
 | 
					- Se puede activar/desactivar `cua-mode` (`configs/base.el`, línea 49) activado para poder copiar, cortar, pegar y deshacer cambios con las combinaciones típicas en lugar de las de emacs.
 | 
				
			||||||
- Con F9 puedes abrir y cerrar neotree.
 | 
					- Con F9 puedes abrir y cerrar treemacs.
 | 
				
			||||||
- Con C-F11 puedes maximizar/restaurar.
 | 
					- Con C-F11 puedes maximizar/restaurar.
 | 
				
			||||||
- Con C-F6 se generan/regenera el archivo TAGs.
 | 
					- Con C-S-c se puede comentar / descomentar un región.
 | 
				
			||||||
- Con C-F5 se abre una terminal en la carpeta del archivo actual.
 | 
					- Con C-S-d se duplica las líneas.
 | 
				
			||||||
- Con M-c se puede comentar / descomentar un región.
 | 
					- Con M-<arrow keys> se mueven las líneas/palabras.
 | 
				
			||||||
- Por defecto he configurado que al presionar TAB se usen 2 espacios en su lugar.
 | 
					- Por defecto he configurado que al presionar TAB se usen 2 espacios en su lugar.
 | 
				
			||||||
- Cuando usas `C-s` (buscar), busca el texto actualmente seleccionado.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
Recuerda que si alguna cosa no te gusta, puedes cambiarla a gusto. Esta configuración fue hecha para mi uso personal y puede que tenga cosas que solo a mi me parecen cómodas/útiles.
 | 
					Recuerda que si alguna cosa no te gusta, puedes cambiarla a gusto. Esta configuración fue hecha para mi uso personal y puede que tenga cosas que solo a mi me parecen cómodas/útiles.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: @import
 | 
					 | 
				
			||||||
# key: imp
 | 
					 | 
				
			||||||
# uuid: imp
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
@import "`(doom-snippets-text nil t)`$0";
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: @import url("//fonts.googleapis...")
 | 
					 | 
				
			||||||
# key: impfont
 | 
					 | 
				
			||||||
# uuid: impfont
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
@import url("http://fonts.googleapis.com/css?family=${1:Open+Sans}");
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: @import url(...)
 | 
					 | 
				
			||||||
# key: impurl
 | 
					 | 
				
			||||||
# uuid: impurl
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
@import url("`(doom-snippets-text nil t)`$0");
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: margin: ...;
 | 
					 | 
				
			||||||
# key: mar
 | 
					 | 
				
			||||||
# uuid: mar
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
margin: ${1:0 auto};
 | 
					 | 
				
			||||||
@@ -1,8 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: @media
 | 
					 | 
				
			||||||
# key: med
 | 
					 | 
				
			||||||
# uuid: med
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
@media ${1:screen} {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: @media (orientation: ?)
 | 
					 | 
				
			||||||
# condition: (looking-back "@media " (line-beginning-position))
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
(orientation: ${1:landscape})
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: @media print { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
@media print {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: padding: ...;
 | 
					 | 
				
			||||||
# key: pad
 | 
					 | 
				
			||||||
# uuid: pad
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
padding: ${1:10px};
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: ...: ...;
 | 
					 | 
				
			||||||
# key: :
 | 
					 | 
				
			||||||
# uuid: :
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
${1:prop}: ${2:`%`};
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: append
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
${1:type} = append($1, ${2:elems})
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: ... := ...
 | 
					 | 
				
			||||||
# key: :=
 | 
					 | 
				
			||||||
# uuid: :=
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
${1:x} := ${2:`%`}
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Seong Yong-ju
 | 
					 | 
				
			||||||
# name: const ... = ...
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
const ${1:name}${2: type} = ${3:value}$0
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: ctx context.Context
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
ctx context.Context
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: func ...(...) ... { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
func ${1:name}(${2:args})${3: return type} {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: func (target) name(args) (results) { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
func (${1:target}) ${2:name}(${3:args})${4: return type} {
 | 
					 | 
				
			||||||
    $0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: for ... { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
for $1 {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: for key, value := range ... { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
for ${1:key}, ${2:value} := range ${3:target} {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: for key, value := range ... { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
for ${1:key}, ${2:value} := range ${3:target} {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: for i := 0; i < n; i++ { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
for ${1:i} := ${2:0}; $1 < ${3:10}; $1++ {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: for ... { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
for $1 {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: func ...(...) ... { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
func ${1:name}(${2:args})${3: return type} {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: go
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
go ${1:func}(${2:args})$0
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: go func
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
go func (${1:args}) {
 | 
					 | 
				
			||||||
    $0
 | 
					 | 
				
			||||||
}(${2:values})
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: go func (short)
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
go func (${1:args}) {
 | 
					 | 
				
			||||||
    $0
 | 
					 | 
				
			||||||
}(${2:values})
 | 
					 | 
				
			||||||
@@ -1,7 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Seong Yong-ju
 | 
					 | 
				
			||||||
# name: if ... { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
if ${1:condition} {
 | 
					 | 
				
			||||||
	`%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,9 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Seong Yong-ju
 | 
					 | 
				
			||||||
# name: if ... { ... } else { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
if ${1:condition} {
 | 
					 | 
				
			||||||
	`%`$2
 | 
					 | 
				
			||||||
} else {
 | 
					 | 
				
			||||||
	$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: if err != nil { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
if err != nil {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: import
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
import ${1:package}$0
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: import
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
import ${1:package}$0
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: type ... interface { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
type $1 interface {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: func main() { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
func main() {
 | 
					 | 
				
			||||||
   $0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: map
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
map[${1:KeyType}]${2:ValueType}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: func (target) name(args) (results) { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
func (${1:target}) ${2:name}(${3:args})${4: return type} {
 | 
					 | 
				
			||||||
    $0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: package
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
package ${1:`(car (last (split-string (file-name-directory buffer-file-name) "/") 2))`}
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: package (short)
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
package ${1:`(car (last (split-string (file-name-directory buffer-file-name) "/") 2))`}
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: printf
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
fmt.Printf("$1\n"${2:, ${3:str}})
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: printf
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
fmt.Printf("$1\n"${2:, ${3:str}})
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: println
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
fmt.Println("${1:msg}")$0
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: println (short)
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
fmt.Println("${1:msg}")$0
 | 
					 | 
				
			||||||
@@ -1,7 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: select
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
select {
 | 
					 | 
				
			||||||
      case ${1:cond}:
 | 
					 | 
				
			||||||
      $0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: type ... struct { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
type $1 struct {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,9 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: switch
 | 
					 | 
				
			||||||
# key: switch
 | 
					 | 
				
			||||||
# uuid: switch
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
switch {
 | 
					 | 
				
			||||||
    case ${1:cond}:
 | 
					 | 
				
			||||||
         $0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: func Test...() { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
func Test${1:Name}(${2:t *testing.T}) {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: var
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
var ${1:name} ${2:type} = ${3:value}$0
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name : for ... { ... }
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
for $1 {
 | 
					 | 
				
			||||||
    `%`$0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: http request writer
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
w http.ResponseWriter, r *http.Request
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Rodrigo Setti <rodrigosetti@gmail.com>
 | 
					 | 
				
			||||||
# name: <dd> ... </dd>
 | 
					 | 
				
			||||||
# group: list
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<dd>$1</dd>
 | 
					 | 
				
			||||||
@@ -1,8 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Rodrigo Setti <rodrigosetti@gmail.com>
 | 
					 | 
				
			||||||
# name: <dl> ... </dl>
 | 
					 | 
				
			||||||
# group: list
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<dl>
 | 
					 | 
				
			||||||
    $0
 | 
					 | 
				
			||||||
</dl>
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: Doctype HTML 5
 | 
					 | 
				
			||||||
# group: meta
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<!DOCTYPE html>
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: DocType XHTML 1.0 frameset
 | 
					 | 
				
			||||||
# group: meta
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: DocType XHTML 1.1
 | 
					 | 
				
			||||||
# group: meta
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: DocType XHTML 1.0 Strict
 | 
					 | 
				
			||||||
# group: meta
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: DocType XHTML 1.0 Transitional
 | 
					 | 
				
			||||||
# group: meta
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Rodrigo Setti <rodrigosetti@gmail.com>
 | 
					 | 
				
			||||||
# name: <dt> ... </dt>
 | 
					 | 
				
			||||||
# group: list
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<dt>$1</dt>
 | 
					 | 
				
			||||||
@@ -1,7 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
 | 
					 | 
				
			||||||
# name: <form method="..." id="..." action="..."></form>
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<form method="$1" id="$2" action="$3">
 | 
					 | 
				
			||||||
  $0
 | 
					 | 
				
			||||||
</form>
 | 
					 | 
				
			||||||
@@ -1,7 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
 | 
					 | 
				
			||||||
# name: <html>...</html>
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<html>
 | 
					 | 
				
			||||||
  $0
 | 
					 | 
				
			||||||
</html>
 | 
					 | 
				
			||||||
@@ -1,7 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
 | 
					 | 
				
			||||||
# name: <html xmlns="...">...</html>
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="${1:en}" lang="${2:en}">
 | 
					 | 
				
			||||||
  $0
 | 
					 | 
				
			||||||
</html>
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: <link rel="stylesheet" ... />
 | 
					 | 
				
			||||||
# key: link
 | 
					 | 
				
			||||||
# uuid: link
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<link rel="${1:stylesheet}" href="${2:url}" type="${3:text/css}" media="${4:screen}" />
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: <!--[if IE]><link stylesheet="..." /><![endif]-->
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<!--[if IE${1: version}]>
 | 
					 | 
				
			||||||
<link rel="${2:stylesheet}" href="${3:url}" type="${4:text/css}" media="${5:screen}" />
 | 
					 | 
				
			||||||
<![endif]-->
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: <a href="mailto:...@...">...</a>
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<a href="mailto:${1:john@doe.com}">`(doom-snippets-format "%n%s%n")`$0</a>
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor : Jimmy Wu <frozenthrone88@gmail.com>
 | 
					 | 
				
			||||||
# group: meta
 | 
					 | 
				
			||||||
# name: <meta name="..." content="..." />
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<meta name="${1:generator}" content="${2:content}" />
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
 | 
					 | 
				
			||||||
# name: <meta http-equiv="..." content="..." />
 | 
					 | 
				
			||||||
# group: meta
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<meta name="${1:Content-Type}" content="${2:text/html; charset=UTF-8}" />
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: <script type="text/javascript">...</script>
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<script type="text/javascript">
 | 
					 | 
				
			||||||
  $0
 | 
					 | 
				
			||||||
</script>
 | 
					 | 
				
			||||||
@@ -1,4 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: <script type="text/javascript" src="..."></script>
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<script type="text/javascript" src="$1"></script>
 | 
					 | 
				
			||||||
@@ -1,5 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
 | 
					 | 
				
			||||||
# name: <textarea ...></textarea>
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<textarea name="$1" id="$2" rows="$3" cols="$4" tabindex="$5"></textarea>
 | 
					 | 
				
			||||||
@@ -1,6 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# contributor: Jimmy Wu <frozenthrone88@gmail.com>
 | 
					 | 
				
			||||||
# name: <th>...</th>
 | 
					 | 
				
			||||||
# group: table
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
<th$1>$2</th>
 | 
					 | 
				
			||||||
@@ -1,7 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: param
 | 
					 | 
				
			||||||
# key: @param
 | 
					 | 
				
			||||||
# uuid: @param
 | 
					 | 
				
			||||||
# condition: (sp-point-in-comment)
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
@param ${1:paramater} $0
 | 
					 | 
				
			||||||
@@ -1,7 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: return
 | 
					 | 
				
			||||||
# key: @return
 | 
					 | 
				
			||||||
# uuid: @return
 | 
					 | 
				
			||||||
# condition: (sp-point-in-comment)
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
@return ${1:description}
 | 
					 | 
				
			||||||
@@ -1,8 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: apr_assert
 | 
					 | 
				
			||||||
# key: apr_assert
 | 
					 | 
				
			||||||
# uuid: apr_assert
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
if (Globals.useAssertions) {
 | 
					 | 
				
			||||||
   ${1:assert ..};
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,8 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: class
 | 
					 | 
				
			||||||
# key: class
 | 
					 | 
				
			||||||
# uuid: class
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
${1:public }class ${2:`(f-base buffer-file-name)`} {
 | 
					 | 
				
			||||||
           $0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,8 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: constructor
 | 
					 | 
				
			||||||
# key: __init__
 | 
					 | 
				
			||||||
# uuid: __init__
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
public ${1:`(f-base buffer-file-name)`}($2) {
 | 
					 | 
				
			||||||
       $0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,9 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: doc
 | 
					 | 
				
			||||||
# key: /*
 | 
					 | 
				
			||||||
# uuid: /*
 | 
					 | 
				
			||||||
# condition: (not (use-region-p))
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
/**
 | 
					 | 
				
			||||||
 * $0
 | 
					 | 
				
			||||||
 */
 | 
					 | 
				
			||||||
@@ -1,8 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: equals
 | 
					 | 
				
			||||||
# key: eq
 | 
					 | 
				
			||||||
# uuid: eq
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
public boolean equals(${1:Class} other) {
 | 
					 | 
				
			||||||
       $0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@@ -1,10 +0,0 @@
 | 
				
			|||||||
# -*- mode: snippet -*-
 | 
					 | 
				
			||||||
# name: file_class
 | 
					 | 
				
			||||||
# key: file
 | 
					 | 
				
			||||||
# uuid: file
 | 
					 | 
				
			||||||
# --
 | 
					 | 
				
			||||||
public class ${1:`(file-name-base
 | 
					 | 
				
			||||||
                    (or (buffer-file-name)
 | 
					 | 
				
			||||||
                        (buffer-name)))`} {
 | 
					 | 
				
			||||||
  $0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user