Compare commits
261 Commits
3b73728c41
...
master
Author | SHA1 | Date | |
---|---|---|---|
6388d5c0bb | |||
cc1fb2a0c9 | |||
4fc380750e | |||
564e6dbac5 | |||
2a1309ecaa | |||
d12c13c027 | |||
3c7ac83e3f | |||
089b056916 | |||
c0a0bc347c | |||
f2faff5f3f | |||
d497b12805 | |||
ed5f25fb4d | |||
f48e200fe7 | |||
668a2c3c91 | |||
cb8a4dcd75 | |||
4749773a51 | |||
d41a4ce7ee | |||
5185766542 | |||
cf7b239bcb | |||
ad54b6e3c9 | |||
cab913064f | |||
c3aabfff88 | |||
a0a1282aa2 | |||
8e6fb27ec8 | |||
32078154c9 | |||
eac4af5029 | |||
f199adb367 | |||
4051c11dad | |||
6be143756c | |||
cfef8c9a4a | |||
fb5e2c8455 | |||
5ebecc1d4b | |||
64d60088cb | |||
dce274d8ff | |||
8133266734 | |||
147949285e | |||
9417dcf830 | |||
447b80428b | |||
95d9746fbf | |||
135671b5b9 | |||
45029768b9 | |||
9876be8389 | |||
9553b240d8 | |||
297416d1ce | |||
4148fff8a1 | |||
39862a753d | |||
85ad5c15b3 | |||
c3a2df6bef | |||
4ceabc679a | |||
4733bb46ac | |||
c97b3a974e | |||
9b1bd93ceb | |||
21185e0438 | |||
3f618a44e7 | |||
e99e71a6a5 | |||
adc3d07d35 | |||
2178a2e7cb | |||
c39574582f | |||
6972b11f0a | |||
8e8544960e | |||
1752b38dc1 | |||
b6dc907ad8 | |||
7d145f6200 | |||
8f0334c51b | |||
da816f098a | |||
4752f03dfc | |||
7134c41dfc | |||
ff22f194d4 | |||
f9329c4a32 | |||
30c890a155 | |||
4407141739 | |||
734d3cf08c | |||
c2792c0415 | |||
f64a8add03 | |||
092b1fb02c | |||
b3bc4df0c9 | |||
8d8a60878f | |||
5c45a7890a | |||
536c9d30e3 | |||
e54a28bb9d | |||
e663c02d97 | |||
4a1d3afb85 | |||
38254302e4 | |||
47554e0bca | |||
e7f8104cb6 | |||
4569080000 | |||
fc802c0db0 | |||
63f76373a5 | |||
5144fd405e | |||
e45141b894 | |||
b8cb8e3ad6 | |||
2fd710ea54 | |||
c292ca77d0 | |||
02577be8c7 | |||
a3ea9985e0 | |||
f5c35fd03c | |||
2e210421e3 | |||
b5a30921a7 | |||
a980735bd8 | |||
b95c3258ab | |||
e276cc0eec | |||
7eaa783f2e | |||
48afb56d36 | |||
3c6a7b371a | |||
baeb0a640b | |||
3660933143 | |||
d196afbe89 | |||
f6d5e2f925 | |||
f5a28724b0 | |||
30fbba45db | |||
dd1398415d | |||
07b4050a0d | |||
5ecf229620 | |||
4274a147f4 | |||
5d728d3a2f | |||
438baf6022 | |||
96ad111227 | |||
806c4c035f | |||
65e3ae4bd9 | |||
e9bc16a1a4 | |||
c90c19323b | |||
2c63d19cf4 | |||
1a4795f6e9 | |||
d588a9ed2e | |||
d22f24ad4b | |||
d3c68d1ac6 | |||
04a3c86321 | |||
6e7836ffb7 | |||
05249c8a2e | |||
7a38ae22bc | |||
870e9a44ac | |||
71367398d6 | |||
055b5151df | |||
f48e747299 | |||
887255253d | |||
0b3138b6c7 | |||
bdaef62ba5 | |||
ff85e08450 | |||
0c636e3ce3 | |||
a1aab4a3fc | |||
cb1b5058fd | |||
954cfe64c7 | |||
370651ebec | |||
d96a05fb7e | |||
2da8c0346b | |||
f6633ee2ed | |||
8ec7f0b425 | |||
d753809a27 | |||
24abfebfe7 | |||
8a31842c17 | |||
886284c70d | |||
c72edac318 | |||
669ca64f6c | |||
a18650a700 | |||
aba4022837 | |||
80664b0033 | |||
db73de0718 | |||
c6c18aab3c | |||
8c5f9ecd14 | |||
81626c4584 | |||
05aabebf6f | |||
25c794daf2 | |||
34029f173e | |||
264a4d61fa | |||
821494dd22 | |||
1768ee428f | |||
cbaed77f63 | |||
32f53f09a4 | |||
05da03b836 | |||
1b7d286415 | |||
70bc86518d | |||
d04c3baf44 | |||
e40aa8d194 | |||
be51f082f7 | |||
f29a3bb673 | |||
eba6324658 | |||
970e63b565 | |||
0f29b5e516 | |||
887b7f068a | |||
21a052895c | |||
412ae58717 | |||
c2f8cc244d | |||
a6cd373b2b | |||
78c20da3b1 | |||
730d3bd0fd | |||
1ad7877974 | |||
9399a3e372 | |||
5aedee6f8e | |||
7658e199fc | |||
fc5afd432d | |||
f41cde5c3c | |||
5738e49658 | |||
695a669b60 | |||
138aa48811 | |||
29328974c2 | |||
e9eb786eaf | |||
d2772d6a6e | |||
8ab0564ad8 | |||
c60c4b8a11 | |||
53f615cabd | |||
cef7d4e78a | |||
1ae42b518e | |||
637f04ae26 | |||
503bf53890 | |||
04e3e2ec29 | |||
e6456414d7 | |||
0179d8ab20 | |||
beaca9c60d | |||
0a89a44121 | |||
0be516d313 | |||
4b43539553 | |||
ff9435b717 | |||
329b6ba040 | |||
61f849a922 | |||
45a2cde1e5 | |||
e63e2b0e21 | |||
b9afc66ee2 | |||
0288bf609f | |||
06cdcfbab7 | |||
c9c268d824 | |||
1e5e583b40 | |||
6e1b1b74f5 | |||
5342a6b4f1 | |||
0a291773fa | |||
01737264b9 | |||
956ed75ed9 | |||
73935d3bc4 | |||
e1c915d261 | |||
ff3cb53fb6 | |||
fb69ae0828 | |||
9b0bb0ea95 | |||
ffd2fba015 | |||
4384c37823 | |||
a673f8c939 | |||
1318e21c21 | |||
0643d7a3cc | |||
8ee98d7966 | |||
79b1cab10e | |||
3bfb4508df | |||
c1b7a9b120 | |||
023f11c25e | |||
6cda0d1d5e | |||
6364157efd | |||
50568de7eb | |||
cdf1478322 | |||
fc9e1bf17e | |||
8e9a3fc301 | |||
765680a051 | |||
fa9c5e7cf5 | |||
0b14aeba36 | |||
811ff581cf | |||
026549eff7 | |||
f929aad937 | |||
36885ac135 | |||
2cd55bc3a7 | |||
7603b69925 | |||
2d91024820 | |||
e8be9f4264 | |||
c05eee7657 | |||
6c3949e3aa | |||
599fe4bb8e |
12
.gitignore
vendored
12
.gitignore
vendored
@ -22,3 +22,15 @@ workspace/
|
||||
/diary
|
||||
/history
|
||||
/projectile.cache
|
||||
/request/
|
||||
/smex-items
|
||||
/tree-sitter/
|
||||
/elpaca/
|
||||
/tramp
|
||||
/nov-places
|
||||
/devdocs/
|
||||
/.mc-lists.el
|
||||
/eshell/
|
||||
/.emacs.desktop
|
||||
/.tutor/
|
||||
/intelephense/
|
||||
|
31
abbrev_defs
Normal file
31
abbrev_defs
Normal file
@ -0,0 +1,31 @@
|
||||
;;-*-coding: utf-8;-*-
|
||||
(define-abbrev-table 'mhtml-mode-abbrev-table
|
||||
'(
|
||||
("doc" "<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=\"UTF-8\"/>
|
||||
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>" nil :count 1)
|
||||
("doctype" "<!DOCTYPE html>" nil :count 0)
|
||||
))
|
||||
|
||||
(define-abbrev-table 'web-mode-abbrev-table
|
||||
'(
|
||||
("doc" "<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset=\"UTF-8\"/>
|
||||
<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>" nil :count 9)
|
||||
("doctype" "<!DOCTYPE html>" nil :count 1)
|
||||
))
|
||||
|
46
configs/init-ai.el
Normal file
46
configs/init-ai.el
Normal file
@ -0,0 +1,46 @@
|
||||
;;; init-ai.el --- Configuración de inteligencias artificales -*- lexical-binding: t -*-
|
||||
|
||||
;; Author: kj <webmaster@outcontrol.net>
|
||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Esta configuración para Inteligencia artifical en emacs, principalmente para el uso de chats.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Cliente LLM (ollama, chatgpt, gemini, etc.)
|
||||
(use-package gptel
|
||||
:defer t
|
||||
:config
|
||||
;; (setq gptel-model 'gemma3:4b
|
||||
;; gptel-backend (gptel-make-ollama "Ollama"
|
||||
;; :host "localhost:11434"
|
||||
;; :stream t
|
||||
;; :models '("mistral:latest"
|
||||
;; "deepseek-r1:1.5b"
|
||||
;; "deepcoder"
|
||||
;; "dolphin-llama3:latest"
|
||||
;; "gemma3:4b"
|
||||
;; "llava:latest"))
|
||||
gptel-default-mode 'org-mode
|
||||
gptel-prompt-prefix-alist
|
||||
'((markdown-mode . "# ")
|
||||
(org-mode . "* ")
|
||||
(text-mode . "# "))
|
||||
gptel-directives
|
||||
'((default . "Eres un LLM que vive dentro de Emacs. Responde de manera concisa.")
|
||||
(programming . "Eres un LLM y un programador profesional cuidadoso. Provee el código y solo el código como output sin ningún texto adicional, prompt o nota.")
|
||||
(programming_tutor . "Eres un LLM y un programador profesional cuidadoso. Revisa el siguiente código y realiza sugerencias concisas en español para mejorarlo.")
|
||||
(programming_explainer . "Eres un LLM y un programador profesional cuidadoso. Revisa el siguiente código y explica en español de manera concisa, su funcionamiento.")
|
||||
(programming_describer . "Eres un LLM y un programador profesional cuidadoso. Revisa el siguiente código y explica en español su funcionamiento línea a línea.")
|
||||
(writing . "Eres un LLM y un asistente de escritura. Responde de manera concisa.")
|
||||
(grammarly . "You are a large language model and professional philologist. Improve grammar and spelling.")
|
||||
(chat . "Eres un LLM y un compañero de conversación. Responde de manera concisa.")
|
||||
(traductor . "Eres un traductor profesional. Traduce a español tomando en cuenta los posibles tecnicismos y nombres que no deberían traducirse.")
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
(provide 'init-ai)
|
||||
;;; init-ai.el ends here
|
@ -5,8 +5,8 @@
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Configuración base de Emacs, no incluye extensiones,
|
||||
;; pero si el theme y los fonts.
|
||||
;; Configuración general de Emacs.
|
||||
;; No incluye paquetes/extensiones, solo configuraciones generales.
|
||||
|
||||
;;; Code:
|
||||
|
||||
@ -19,48 +19,55 @@
|
||||
(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
|
||||
;; (require 'package)
|
||||
|
||||
;; (setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||
;; ("org" . "https://orgmode.org/elpa/")
|
||||
;; ("elpa" . "https://elpa.gnu.org/packages/")))
|
||||
|
||||
;; (package-initialize)
|
||||
|
||||
;; Actualizar repositorios si aún no esta actualizados
|
||||
;; (unless package-archive-contents
|
||||
;; (package-refresh-contents))
|
||||
;; Instalar elpaca.el (reemplpazando package.el)
|
||||
(defvar elpaca-installer-version 0.11)
|
||||
(defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory))
|
||||
(defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory))
|
||||
(defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory))
|
||||
(defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git"
|
||||
:ref nil :depth 1 :inherit ignore
|
||||
:files (:defaults "elpaca-test.el" (:exclude "extensions"))
|
||||
:build (:not elpaca--activate-package)))
|
||||
(let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory))
|
||||
(build (expand-file-name "elpaca/" elpaca-builds-directory))
|
||||
(order (cdr elpaca-order))
|
||||
(default-directory repo))
|
||||
(add-to-list 'load-path (if (file-exists-p build) build repo))
|
||||
(unless (file-exists-p repo)
|
||||
(make-directory repo t)
|
||||
(when (< emacs-major-version 28) (require 'subr-x))
|
||||
(condition-case-unless-debug err
|
||||
(if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*"))
|
||||
((zerop (apply #'call-process `("git" nil ,buffer t "clone"
|
||||
,@(when-let* ((depth (plist-get order :depth)))
|
||||
(list (format "--depth=%d" depth) "--no-single-branch"))
|
||||
,(plist-get order :repo) ,repo))))
|
||||
((zerop (call-process "git" nil buffer t "checkout"
|
||||
(or (plist-get order :ref) "--"))))
|
||||
(emacs (concat invocation-directory invocation-name))
|
||||
((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch"
|
||||
"--eval" "(byte-recompile-directory \".\" 0 'force)")))
|
||||
((require 'elpaca))
|
||||
((elpaca-generate-autoloads "elpaca" repo)))
|
||||
(progn (message "%s" (buffer-string)) (kill-buffer buffer))
|
||||
(error "%s" (with-current-buffer buffer (buffer-string))))
|
||||
((error) (warn "%s" err) (delete-directory repo 'recursive))))
|
||||
(unless (require 'elpaca-autoloads nil t)
|
||||
(require 'elpaca)
|
||||
(elpaca-generate-autoloads "elpaca" repo)
|
||||
(load "./elpaca-autoloads")))
|
||||
(add-hook 'after-init-hook #'elpaca-process-queues)
|
||||
(elpaca `(,@elpaca-order))
|
||||
|
||||
;; Instalar use-package si no está instalado
|
||||
(straight-use-package 'use-package)
|
||||
(setq use-package-always-ensure t)
|
||||
(elpaca elpaca-use-package
|
||||
;; Enable :elpaca use-package keyword.
|
||||
(elpaca-use-package-mode)
|
||||
;; Assume :elpaca t unless otherwise specified.
|
||||
(setq elpaca-use-package-by-default t))
|
||||
|
||||
;; Theme
|
||||
(use-package dracula-theme
|
||||
:straight t
|
||||
:config
|
||||
(load-theme 'dracula t)
|
||||
(set-face-attribute 'default nil :font "Fira Code Retina" :height 112) ; Font
|
||||
)
|
||||
|
||||
;; Instalar use-package en caso de no tenerlo
|
||||
;;(unless (package-installed-p 'use-package)
|
||||
;; (package-install 'use-package))
|
||||
;; Block until current queue processed.
|
||||
(elpaca-wait)
|
||||
|
||||
(defconst private-dir (expand-file-name "private" user-emacs-directory))
|
||||
(defconst temp-dir (format "%s/cache" private-dir)
|
||||
@ -76,14 +83,17 @@
|
||||
(setq default-process-coding-system '(utf-8-unix . utf-8-unix))
|
||||
|
||||
;; Emacs customizations
|
||||
(menu-bar-mode 0) ; Quitar menús.
|
||||
(tool-bar-mode 0) ; Quitar toolbar.
|
||||
(scroll-bar-mode -1) ; Quitar scrollbar.
|
||||
(when (display-graphic-p)
|
||||
(scroll-bar-mode -1) ; Quitar scrollbar.
|
||||
)
|
||||
(tooltip-mode -1) ; Disable tooltips.
|
||||
(global-display-line-numbers-mode) ; Mostar número de línea.
|
||||
(global-so-long-mode 1) ; Abrir archivos grandes o con líneas largas en el modo so-long por defecto.
|
||||
(show-paren-mode 1) ; Habilitar resaltado de brackets.
|
||||
(global-subword-mode 1) ; Habilitar subpalabras (detectar palabras dentro de un camelCase y Pascal case.)
|
||||
(pending-delete-mode t) ; Cuando selecciono un texto y escribo, el texto se borra (emacs por defecto solo escribe donde está el cursor).
|
||||
|
||||
;; (global-hl-line-mode) ; Resaltar línea actual por defecto.
|
||||
(setq use-short-answers t) ; Usar respuesta cortas (y/n) en lugar de las largas (yes/no)
|
||||
(setq-default
|
||||
cursor-type 'bar ; Usar la barrita como cursor
|
||||
cursor-in-non-selected-windows nil ; Desaparecer el cursor en frames no activos.
|
||||
@ -94,12 +104,12 @@
|
||||
custom-file (concat private-dir "/.custom.el") ; Cabiar la ruta del código que se genera al isntalar un theme o package
|
||||
ac-ignore-case nil ; Desactivar el autocapitalizado.
|
||||
ac-disable-faces nil ; Auto-complete hablitado incluso entre comillas (fuente: https://bit.ly/3a9wCB4).
|
||||
global-hl-line-mode 1 ; Resaltar línea actual por defecto.
|
||||
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)))
|
||||
;; (set-frame-parameter nil 'alpha-background 95)
|
||||
;; Font por defecto
|
||||
(set-face-attribute 'default nil :font "Fira Code Retina" :height 112)
|
||||
|
||||
;; Backups enabled, use nil to disable
|
||||
(setq
|
||||
@ -117,21 +127,13 @@
|
||||
"Carga la configuración del modo daemon."
|
||||
(message "Corriendo en modo daemon.")
|
||||
(set-face-attribute 'default nil :font "Fira Code Retina" :height 112)
|
||||
|
||||
;; Set the fixed pitch face
|
||||
;;(set-face-attribute 'fixed-pitch nil :font "Fira Code Retina")
|
||||
|
||||
;; Set the variable pitch face
|
||||
;;(set-face-attribute 'variable-pitch nil :font "Cantarell" :weight 'regular)
|
||||
|
||||
;; Abrir primero el dashboard
|
||||
(setq initial-buffer-choice (lambda () (get-buffer "*dashboard*")))
|
||||
(scroll-bar-mode -1)
|
||||
|
||||
;; Cerrar buffers al cerrar emacsclient
|
||||
(add-hook 'delete-frame-functions
|
||||
(lambda (frame)
|
||||
(mapc 'kill-buffer (delq (get-buffer "*dashboard*") (buffer-list)))
|
||||
))
|
||||
;; (add-hook 'delete-frame-functions
|
||||
;; (lambda (frame)
|
||||
;; (mapc 'kill-buffer (delq (get-buffer "*dashboard*") (buffer-list)))
|
||||
;; ))
|
||||
)
|
||||
|
||||
(if (daemonp)
|
||||
@ -141,9 +143,7 @@
|
||||
(setup-daemon))))
|
||||
(message "Corriendo en modo normal."))
|
||||
|
||||
;(add-hook 'window-setup-hook 'toggle-frame-maximized t)
|
||||
|
||||
(load custom-file)
|
||||
(add-hook 'elpaca-after-init-hook (lambda () (load custom-file 'noerror)))
|
||||
|
||||
(provide 'init-base)
|
||||
;;; init-base.el ends here
|
||||
|
@ -1,57 +0,0 @@
|
||||
;;; 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
|
110
configs/init-corfu.el
Normal file
110
configs/init-corfu.el
Normal file
@ -0,0 +1,110 @@
|
||||
;;; init-corfu.el --- Autocompletado con corfu -*- lexical-binding: t -*-
|
||||
|
||||
;; Author: kj <webmaster@outcontrol.net>
|
||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Archivo de configuración específico para el paquete corfu.
|
||||
;; Corfu, de manera resumida, es el que nos muestra el autocompletado
|
||||
;; en Emacs, tanto para código como para otro tipo de textos.
|
||||
;;
|
||||
;; Este paquete viene a ser una alternativa a Company, por lo
|
||||
;; que no se deberían activar los 2 al mismo tiempo.
|
||||
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package corfu
|
||||
:defer t
|
||||
:ensure (:files (:defaults "extensions/*")
|
||||
:includes (corfu-info corfu-history))
|
||||
:hook ((corfu-mode . corfu-popupinfo-mode))
|
||||
:bind (:map corfu-map
|
||||
("<tab>" . corfu-quit)
|
||||
("<escape>" . corfu-quit)
|
||||
("<SPC>" . corfu-insert-separator))
|
||||
:custom
|
||||
(corfu-auto t)
|
||||
:config
|
||||
(global-corfu-mode)
|
||||
(setq corfu-popupinfo-delay 0
|
||||
corfu-auto-delay 1
|
||||
corfu-auto-prefix 1
|
||||
corfu-cycle t
|
||||
corfu-quit-at-boundary t
|
||||
corfu-preview-current nil
|
||||
corfu-quit-no-match t)
|
||||
(when (< emacs-major-version 29)
|
||||
(advice-add 'pcomplete-completions-at-point :around #'cape-wrap-silent)
|
||||
(advice-add 'pcomplete-completions-at-point :around #'cape-wrap-purify))
|
||||
(corfu-history-mode 1)
|
||||
(savehist-mode 1)
|
||||
(add-to-list 'savehist-additional-variables 'corfu-history)
|
||||
)
|
||||
|
||||
;; Cambia la forma de mostrar y buscar sugerencias (afecta a corfu, pero también a otros como vertico).
|
||||
(use-package orderless
|
||||
:defer t
|
||||
:after corfu
|
||||
:custom
|
||||
(completion-styles '(orderless)) ; Use orderless
|
||||
(completion-category-defaults nil) ; I want to be in control!
|
||||
(setq completion-ignore-case t)
|
||||
(completion-category-overrides '((file (styles basic partial-completion orderless))))
|
||||
(orderless-matching-styles
|
||||
'(orderless-literal
|
||||
orderless-prefixes
|
||||
orderless-initialism
|
||||
orderless-regexp
|
||||
orderless-flex ; Basically fuzzy finding
|
||||
;; orderless-strict-leading-initialism
|
||||
;; orderless-strict-initialism
|
||||
;; orderless-strict-full-initialism
|
||||
;; orderless-without-literal ; Recommended for dispatches instead
|
||||
))
|
||||
)
|
||||
|
||||
|
||||
;; Set de funciones de para las sugerencias de corfu.
|
||||
(use-package cape
|
||||
:defer t
|
||||
:ensure (:host github :repo "minad/cape")
|
||||
:after corfu
|
||||
:bind (("C-c f" . cape-file)
|
||||
("C-c l" . cape-line)
|
||||
("C-c _" . cape-tex))
|
||||
:init
|
||||
(setq text-mode-ispell-word-completion nil)
|
||||
;; (add-to-list 'completion-at-point-functions #'cape-line) ;; Completar línea actual en función de lo que dice otras líneas de buffer.
|
||||
;; (add-to-list 'completion-at-point-functions #'cape-tex) ;; Completar Latex (caracteres unicode).
|
||||
(add-to-list 'completion-at-point-functions #'cape-dict) ;; Completar desde un diccionario (por defecto toma el de linux que está en /usr/share/dict/words).
|
||||
(add-to-list 'completion-at-point-functions #'cape-dabbrev) ;; Completar desde otras la palabras del buffer.
|
||||
(add-to-list 'completion-at-point-functions #'cape-abbrev) ;; Completar desde una abreviaciónes configuradas con add-global-abbrev (añadir abreviación global) o add-mode-abbrev (abreviación para el modo actual).
|
||||
(add-to-list 'completion-at-point-functions #'cape-file) ;; Completar rutas de archivos.
|
||||
(add-to-list 'completion-at-point-functions #'cape-keyword) ;; Completar desde keyword del lenguaje.
|
||||
|
||||
(advice-add 'eglot-completion-at-point :around #'cape-wrap-buster)
|
||||
)
|
||||
|
||||
;; Hacer que corfu funcione en la terminal
|
||||
(unless (display-graphic-p)
|
||||
(use-package corfu-terminal
|
||||
:after corfu
|
||||
:ensure (:repo "https://codeberg.org/akib/emacs-corfu-terminal.git")
|
||||
:config
|
||||
(corfu-terminal-mode +1))
|
||||
)
|
||||
|
||||
;; Iconos en corfu
|
||||
(use-package kind-icon
|
||||
:ensure t
|
||||
:after corfu
|
||||
:custom
|
||||
(kind-icon-default-face 'corfu-default) ; to compute blended backgrounds correctly
|
||||
:config
|
||||
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter))
|
||||
|
||||
|
||||
(provide 'init-corfu)
|
||||
;;; init-corfu.el ends here
|
@ -7,32 +7,31 @@
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; En esta sección está la configuración para ctags.
|
||||
;; Quizá con la aparición de lsp sea menos necesaria,
|
||||
;; pero dado a que sigue teniendo potencial para aportar
|
||||
;; además de tener un rendimiento muy bueno es mejor
|
||||
;; no dejarla de lado.
|
||||
|
||||
;; Ctags IDE on the True Editor
|
||||
;; @see https://github.com/universal-ctags/citre#quick-start
|
||||
|
||||
(use-package citre
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:diminish
|
||||
:bind (("C-x c j" . citre-jump+)
|
||||
("C-x c k" . citre-jump-back)
|
||||
:bind (("C-x c ." . citre-jump)
|
||||
("C-x c ," . 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"
|
||||
(setq citre-auto-enable-citre-mode-modes '(prog-mode)
|
||||
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))
|
||||
|
||||
:config
|
||||
(with-no-warnings
|
||||
;; Integrate with `lsp-mode' and `eglot'
|
||||
(define-advice xref--create-fetcher (:around (fn &rest args) fallback)
|
||||
(let ((fetcher (apply fn args))
|
||||
|
@ -5,31 +5,63 @@
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Este archivo tiene todo lo relacionado con eglot.
|
||||
;; Eglot es un cliente LSP para Emacs que desde la
|
||||
;; versión 29 viene integrado dentro del mismo.
|
||||
;;
|
||||
;; El nombre Eglot es un apócope de "Emacs polyglot"
|
||||
;; ya que con este cliente podemos añadir soporte para
|
||||
;; muchísimos lenguajes, puesto que actualente el que
|
||||
;; un lenguaje tenga su propio LSP es muy normal.
|
||||
;;
|
||||
;; Como añadido:
|
||||
;;
|
||||
;; Un Languaje Server Provider (LSP), es un protocolo
|
||||
;; mediante el cual existen servidores para lenguajes
|
||||
;; en específico, los cuales proveen cosas como el
|
||||
;; autocompletado, linting, documentación, ir a la
|
||||
;; definición, etc.
|
||||
;;
|
||||
;; Este protocolo viene a solucionar el problema de
|
||||
;; que cada herramienta de programación tenga que
|
||||
;; volver a crear su propio soporte para cada uno
|
||||
;; de los lenguajes (DRY).
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package eglot
|
||||
:defer t
|
||||
:straight (:type built-in)
|
||||
:ensure nil
|
||||
:hook ((css-mode . eglot-ensure)
|
||||
(html-mode . eglot-ensure)
|
||||
(php-mode . eglot-ensure)
|
||||
(php-ts-mode . eglot-ensure)
|
||||
(js-mode . eglot-ensure)
|
||||
(tsx-ts-mode . eglot-ensure)
|
||||
(typescript-ts-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)))
|
||||
(setq eglot-sync-connect 0)
|
||||
(add-to-list 'eglot-server-programs '(php-mode . ("intelephense" "--stdio")))
|
||||
)
|
||||
|
||||
;; Mejorar la velocidad de eglot (un binario en rust )
|
||||
(use-package eglot-booster
|
||||
:defer t
|
||||
:ensure (:host github :repo "jdtsmith/eglot-booster")
|
||||
:after eglot
|
||||
:config
|
||||
;;
|
||||
(if (executable-find "emacs-lsp-booster")
|
||||
(eglot-booster-mode)
|
||||
(message "No está instalado emacs-lsp-booster. Eglot se usará de modo normal."))
|
||||
)
|
||||
|
||||
;; Emmet (mientras veo como hacer funcionar emmet-ls)
|
||||
(use-package emmet-mode
|
||||
:defer t
|
||||
:straight t
|
||||
:after eglot
|
||||
:hook
|
||||
((html-mode . emmet-mode)
|
||||
(web-mode . emmet-mode))
|
||||
@ -38,24 +70,20 @@
|
||||
;; Revisar por errores en el código
|
||||
(use-package flymake
|
||||
:defer t
|
||||
:straight (:type built-in)
|
||||
:ensure nil
|
||||
:hook (prog-mode . (lambda ()
|
||||
(unless (derived-mode-p 'makefile-mode)
|
||||
(flymake-mode))))
|
||||
:config
|
||||
(remove-hook 'flymake-diagnostic-functions 'flymake-proc-legacy-flymake)
|
||||
)
|
||||
|
||||
;; Mostar los errores de flymake en un popup-tip
|
||||
(use-package flymake-diagnostic-at-point
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure 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
|
||||
|
@ -5,54 +5,84 @@
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; En este archivo está toda la configuración relacionada
|
||||
;; con el paquete Evil.
|
||||
;;
|
||||
;; Evil es un paquete para Emacs, que básicamente nos
|
||||
;; permite tener VIM dentro de Emacs.
|
||||
|
||||
;;; Code:
|
||||
(use-package evil
|
||||
:defer t
|
||||
:straight t
|
||||
:hook (after-init . evil-mode)
|
||||
:hook ((elpaca-after-init . evil-mode)
|
||||
(git-timemachine-mode . evil-emacs-state))
|
||||
:init
|
||||
(setq evil-want-keybinding nil)
|
||||
;; Habilitar atajos de de tecla de emacs en insert state
|
||||
(setq evil-disable-insert-state-bindings t)
|
||||
:config
|
||||
;; Configuraciones básicas
|
||||
(setq evil-default-state 'emacs) ;; Modo por defecto en emacs
|
||||
;; (setq evil-default-state 'emacs) ;; Modo por defecto en emacs
|
||||
;; (setq evil-default-state 'insert) ;; Modo por defecto en emacs
|
||||
(setq evil-emacs-state-cursor 'bar) ;; Cursor de emacs state en bar
|
||||
;; (setq evil-normal-state-cursor 'bar) ;; Cursor de normal state en bar en lugar de box
|
||||
(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))
|
||||
;; Arreglar el problemita con corfu-quit y el cambio de modos
|
||||
(evil-define-key 'emacs 'global (kbd "<escape>") '(lambda ()
|
||||
"Call `corfu-quit' and then return to Normal State."
|
||||
(interactive)
|
||||
(call-interactively 'corfu-quit)
|
||||
(evil-normal-state)))
|
||||
|
||||
;; 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 'normal 'global (kbd "<escape>") 'corfu-quit)
|
||||
;; Cambiar a mode emacs con escape
|
||||
;; (evil-define-key 'emacs 'global (kbd "<escape>") 'evil-normal-state)
|
||||
;; Cambiar Insert state por emacs state.
|
||||
;; (defalias 'evil-insert-state 'evil-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)
|
||||
;; (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)
|
||||
;; Cambiar U para hacer redo
|
||||
(evil-define-key 'normal 'global (kbd "U") 'undo-redo)
|
||||
(evil-define-key 'normal 'global (kbd "C-S-z") 'undo-redo)
|
||||
(evil-define-key 'normal 'global (kbd "M-.") 'xref-find-definitions)
|
||||
|
||||
;; Arreglar yank-pop en normal mode
|
||||
(evil-define-key 'normal 'global (kbd "M-y") 'counsel-yank-pop)
|
||||
(evil-define-key 'normal 'global (kbd "M-y") 'consult-yank-pop)
|
||||
|
||||
;; Re-bindear C-p y C-n a como es normalmente
|
||||
;; Re-bindear keys a como funcionan en emacs.
|
||||
(evil-define-key 'normal 'global (kbd "C-p") 'previous-line)
|
||||
(evil-define-key 'normal 'global (kbd "C-n") 'next-line)
|
||||
(evil-define-key 'normal 'global (kbd "C-e") 'move-end-of-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)
|
||||
(evil-define-key 'motion 'global (kbd "<leader>o") 'other-window)
|
||||
|
||||
;; Habilitar el scrolear con C-v como en emacs en evil
|
||||
(evil-define-key 'motion 'global (kbd "C-v") 'scroll-up-command)
|
||||
|
||||
;; Añadir nueva linea sin salir del modo normal
|
||||
(evil-define-key 'motion 'global (kbd "<leader><RET>") 'newline)
|
||||
|
||||
;; Abrir historial del kill-ring/portapapeles
|
||||
(evil-define-key vim-states 'global (kbd "<leader>y") 'consult-yank-pop)
|
||||
|
||||
;; Expand region desde motion states
|
||||
(evil-define-key 'motion 'global (kbd "<leader>+") 'er/expand-region)
|
||||
|
||||
;; Identado en motion modes.
|
||||
(evil-define-key 'motion 'global (kbd "<tab>") 'indent-for-tab-command)
|
||||
|
||||
;; Atajos con leader key para frames
|
||||
(evil-define-key 'motion 'global (kbd "<leader>0") 'delete-window)
|
||||
@ -66,21 +96,47 @@
|
||||
;; 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>mp") 'php-ts-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
|
||||
(evil-define-key 'motion 'global (kbd "<leader>b") 'switch-to-buffer) ;; Cambiar de buffer
|
||||
(evil-define-key 'motion 'global (kbd "<leader>p") 'project-find-file) ;; Archivos del proyecto (o abrir proyecto si no hay alguno)
|
||||
(evil-define-key 'motion 'global (kbd "<leader>cp") 'project-switch-project) ;; Cambiar proyecto
|
||||
(evil-define-key 'motion 'global (kbd "<leader>f") 'find-file) ;; Abrir archivo
|
||||
(evil-define-key 'motion 'global (kbd "<leader>xr") 'consult-recent-file) ;; Lista de archivos recientes
|
||||
(evil-define-key 'motion 'global (kbd "<leader>rg") 'consult-ripgrep) ;; Búsqueda rápida con ripgrep
|
||||
(evil-define-key 'motion 'global (kbd "<leader>gi") 'imenu) ;; imenu
|
||||
(evil-define-key 'motion 'global (kbd "<leader>gg") 'goto-line) ;; Ir a la línea.
|
||||
|
||||
;; Iniciar en normal state si es un lenguaje de programación
|
||||
;; Iniciar en normal state solo en modos específicos
|
||||
(setq evil-default-state 'emacs) ;; Modo por defecto en emacs
|
||||
(evil-set-initial-state 'prog-mode 'normal)
|
||||
(evil-set-initial-state 'org-mode 'normal)
|
||||
(evil-set-initial-state 'text-mode 'normal)
|
||||
(evil-set-initial-state 'csv-mode 'normal)
|
||||
(evil-set-initial-state 'fundamental-mode 'normal)
|
||||
(evil-set-initial-state 'dashboard-mode 'normal)
|
||||
(evil-set-initial-state 'dired 'normal)
|
||||
(evil-set-initial-state 'vterm-mode 'emacs)
|
||||
(evil-set-initial-state 'magit-mode 'emacs)
|
||||
(evil-set-initial-state 'git-commit-mode 'emacs)
|
||||
)
|
||||
|
||||
;; Funciones y atajos de teclas especiales para evil cuando estamo en org-mode.
|
||||
;; Por ejemplo, para que evil-open-below funcione similar a org-return cuando
|
||||
;; estamos dentro de una lista.
|
||||
(use-package evil-org
|
||||
:ensure t
|
||||
:defer t
|
||||
:after org
|
||||
:hook (org-mode . evil-org-mode))
|
||||
|
||||
;; Similar a Vimtutor, pero para evil.
|
||||
(use-package evil-tutor
|
||||
:defer t
|
||||
:ensure t)
|
||||
|
||||
(provide 'init-evil)
|
||||
;;; init-evil.el ends here
|
||||
|
@ -5,25 +5,15 @@
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Aqui se encuentran funciones sueltas de Emacs.
|
||||
|
||||
;;; 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)))
|
||||
(set-frame-parameter nil 'alpha-background value))
|
||||
|
||||
;; Comentar línea o región
|
||||
(defun comment-or-uncomment-region-or-line ()
|
||||
@ -56,12 +46,48 @@ Saves to a temp file and puts the filename in the kill ring."
|
||||
;; 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))))
|
||||
;; Mostrar y ocultar el diff de la línea de git-gutter
|
||||
(defun git-gutter:toggle-popup-hunk ()
|
||||
"Toggle 'git-gutter' hunk window."
|
||||
(interactive)
|
||||
(if (and (get-buffer "*git-gutter:diff*") (window-live-p (git-gutter:popup-buffer-window)))
|
||||
(delete-window (git-gutter:popup-buffer-window))
|
||||
(git-gutter:popup-hunk)))
|
||||
|
||||
;; Obtener el nombre del proyecto desde project.el
|
||||
(defun kj/project-name (&optional project)
|
||||
"Return the name for PROJECT.
|
||||
If PROJECT is not specified, assume current project root."
|
||||
(when-let (root (or project (kj/project-root)))
|
||||
(file-name-nondirectory
|
||||
(directory-file-name
|
||||
(file-name-directory root)))))
|
||||
|
||||
;; Obtener la raíz del proyecto desde project.el
|
||||
(defun kj/project-root ()
|
||||
"Return the current project root."
|
||||
(when-let (project (project-current))
|
||||
(project-root project)))
|
||||
|
||||
;; Cambia entre ocultar o no la barra de título cuando está maximizado
|
||||
(defun toggle-hide-title-bar()
|
||||
"Toggle hide title bar when the frame is maximed."
|
||||
(interactive)
|
||||
(if (and (boundp 'title-bar-maximixed) title-bar-maximixed)
|
||||
(progn
|
||||
(remove-hook 'window-size-change-functions 'frame-hide-title-bar-when-maximized)
|
||||
(setq title-bar-maximixed nil))
|
||||
(progn
|
||||
(add-hook 'window-size-change-functions 'frame-hide-title-bar-when-maximized)
|
||||
(setq title-bar-maximixed t)))
|
||||
)
|
||||
|
||||
;; Creando un hook para luego de que el theme ha cargado
|
||||
(defvar after-load-theme-hook nil
|
||||
"Hook run after a color theme is loaded using `load-theme'.")
|
||||
(defadvice load-theme (after run-after-load-theme-hook activate)
|
||||
"Run `after-load-theme-hook'."
|
||||
(run-hooks 'after-load-theme-hook))
|
||||
|
||||
(provide 'init-functions)
|
||||
;;; init-functions.el ends here.
|
||||
|
@ -1,130 +0,0 @@
|
||||
;;; 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
|
@ -5,36 +5,38 @@
|
||||
|
||||
;;; 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.
|
||||
;; Aquí se configuran los atajos de teclas generales.
|
||||
;; Los atajos de teclas relacionados con paquetes en
|
||||
;; específico estarán en el archivo donde se esté
|
||||
;; configurando dicho paquete o dentro del paquete
|
||||
;; mismo, para aquellos que vengan con atajos ya
|
||||
;; configurados desde su instalación.
|
||||
|
||||
;;; 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
|
||||
(global-set-key (kbd "<mouse-3>") 'context-menu-open) ; Abrir menú contextal al hacer clic derecho
|
||||
|
||||
;; 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 mh") 'mhtml-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 mp") 'php-ts-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)
|
||||
;; Cambiar de ventana
|
||||
(global-set-key (kbd "C-S-o") 'other-window)
|
||||
|
||||
;; Saltar entre párrafos
|
||||
(define-key global-map "\M-p" 'backward-paragraph)
|
||||
(define-key global-map "\M-n" 'forward-paragraph)
|
||||
|
||||
;; 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
|
||||
|
@ -1,267 +0,0 @@
|
||||
;;; 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
|
151
configs/init-minibuffer.el
Normal file
151
configs/init-minibuffer.el
Normal file
@ -0,0 +1,151 @@
|
||||
;;; init-minibuffer.el --- Ayuditas y autocompletado del minibufer -*- lexical-binding: t -*-
|
||||
|
||||
;; Author: kj <webmaster@outcontrol.net>
|
||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Aquí se encuentran todos los paquetes que tienen como
|
||||
;; objetivo mejorar el minibuffer de Emacs.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; UI para completado
|
||||
(use-package vertico
|
||||
:defer t
|
||||
:bind (:map vertico-map
|
||||
("RET" . vertico-directory-enter)
|
||||
("DEL" . vertico-directory-delete-char)
|
||||
("TAB" . minibuffer-complete)
|
||||
("M-DEL" . vertico-directory-delete-word))
|
||||
:hook ((elpaca-after-init . vertico-mode)
|
||||
(elpaca-after-init . savehist-mode) ;; savehist sirve para recordar el último comando de M-x
|
||||
(rfn-eshadow-update-overlay . vertico-directory-tidy))
|
||||
:config
|
||||
(setq read-file-name-completion-ignore-case t
|
||||
read-buffer-completion-ignore-case t
|
||||
completion-ignore-case t)
|
||||
)
|
||||
|
||||
;; Reemplazo para counsel
|
||||
(use-package consult
|
||||
:defer t
|
||||
:bind (("C-x p" . project-find-file)
|
||||
("C-S-s" . consult-line)
|
||||
("C-c r g" . consult-ripgrep)
|
||||
("C-S-r" . consult-ripgrep)
|
||||
;; ("C-S-s" . isearch-forward)
|
||||
("M-m" . consult-mode-command)
|
||||
("C-c h" . consult-history)
|
||||
("C-c k" . consult-kmacro)
|
||||
|
||||
([remap Info-search] . consult-info)
|
||||
([remap imenu] . consult-imenu)
|
||||
([remap recentf-open-files] . consult-recent-file)
|
||||
|
||||
|
||||
("C-x M-." . consult-complex-command) ;; orig. repeat-complex-command
|
||||
("C-c p b" . consult-project-buffer) ;; orig. project-switch-to-buffer
|
||||
("C-c p p" . project-switch-project)
|
||||
;; Consult search
|
||||
("C-c p f" . consult-find) ;; Búsqueda de archivos en todo el projecto incluso en carpetas
|
||||
("C-c p l" . consult-line-multi) ;; Búsqueda en todos los buffers del projecto abiertos
|
||||
;; Custom M-# bindings for fast register access
|
||||
("C-'" . consult-register-load)
|
||||
("M-'" . consult-register-store) ;; orig. abbrev-prefix-mark (unrelated)
|
||||
;; Other custom bindings
|
||||
("M-y" . consult-yank-pop) ;; orig. yank-pop
|
||||
;; M-g bindings in `goto-map'
|
||||
("M-g f" . consult-flymake) ;; Alternative: consult-flycheck
|
||||
("M-g g" . consult-goto-line) ;; orig. goto-line
|
||||
("M-g M-g" . consult-goto-line) ;; orig. goto-line
|
||||
("M-g i" . consult-imenu)
|
||||
("M-g I" . consult-imenu-multi)
|
||||
|
||||
;; Minibuffer history
|
||||
:map minibuffer-local-map
|
||||
("<escape>" . minibuffer-keyboard-quit) ;; Cacelar minibuffer con escape (más rápido que C-g)
|
||||
("C-<return>" . newline) ;; Insertar nueva línea estando en el minibufer (Mas rápido que C-q C-j)
|
||||
("C-S-s" . (lambda ()
|
||||
"Insert the current symbol."
|
||||
(interactive)
|
||||
(insert (save-excursion
|
||||
(set-buffer (window-buffer (minibuffer-selected-window)))
|
||||
(or (thing-at-point 'symbol t) ""))))) ;; Al presionar por segunda ves C-s busca el símbolo actual.
|
||||
)
|
||||
|
||||
;; Enable automatic preview at point in the *Completions* buffer. This is
|
||||
;; relevant when you use the default completion UI.
|
||||
:hook (completion-list-mode . consult-preview-at-point-mode)
|
||||
|
||||
;; The :init configuration is always executed (Not lazy)
|
||||
:init
|
||||
;; Optionally configure the register formatting. This improves the register
|
||||
;; preview for `consult-register', `consult-register-load',
|
||||
;; `consult-register-store' and the Emacs built-ins.
|
||||
(setq register-preview-delay 0.5
|
||||
register-preview-function #'consult-register-format)
|
||||
|
||||
;; Optionally tweak the register preview window.
|
||||
;; This adds thin lines, sorting and hides the mode line of the window.
|
||||
(advice-add #'register-preview :override #'consult-register-window)
|
||||
|
||||
;; Use Consult to select xref locations with preview
|
||||
(with-eval-after-load 'xref
|
||||
(setq xref-show-xrefs-function #'consult-xref
|
||||
xref-show-definitions-function #'consult-xref))
|
||||
|
||||
:config
|
||||
;; Optionally configure preview. The default value
|
||||
;; is 'any, such that any key triggers the preview.
|
||||
;; (setq consult-preview-key 'any)
|
||||
(setq consult-preview-key "M-.")
|
||||
;; (setq consult-preview-key '("S-<down>" "S-<up>"))
|
||||
;; For some commands and buffer sources it is useful to configure the
|
||||
;; :preview-key on a per-command basis using the `consult-customize' macro.
|
||||
(consult-customize
|
||||
consult-goto-line
|
||||
consult-theme :preview-key '(:debounce 0.4 any))
|
||||
|
||||
;; Optionally configure the narrowing key.
|
||||
;; Both < and C-+ work reasonably well.
|
||||
(setq consult-narrow-key "<") ;; "C-+"
|
||||
|
||||
;; Optionally make narrowing help available in the minibuffer.
|
||||
;; You may want to use `embark-prefix-help-command' or which-key instead.
|
||||
(define-key consult-narrow-map (vconcat consult-narrow-key "?") #'consult-narrow-help))
|
||||
|
||||
;; nerd-icons en ibuffer
|
||||
(use-package nerd-icons-ibuffer
|
||||
:defer t
|
||||
:hook (ibuffer-mode . nerd-icons-ibuffer-mode))
|
||||
|
||||
;; Descripciones en el minibufer
|
||||
(use-package marginalia
|
||||
:defer t
|
||||
:hook (elpaca-after-init . marginalia-mode))
|
||||
|
||||
;; Nerd icons para vertico
|
||||
(use-package nerd-icons-completion
|
||||
:after nerd-icons
|
||||
:config (nerd-icons-completion-mode))
|
||||
|
||||
;; Todolist de todo el projecto desde consult.
|
||||
(use-package consult-todo
|
||||
:demand t
|
||||
:bind ("C-c t" . consult-todo)
|
||||
:defer t)
|
||||
|
||||
;; Mover el minibufer de vertico al centro de la pantalla.
|
||||
(use-package vertico-posframe
|
||||
:after vertico
|
||||
:config
|
||||
(vertico-posframe-mode 1)
|
||||
(setq vertico-posframe-border-width 1)
|
||||
(setq vertico-posframe-parameters
|
||||
'((left-fringe . 8)
|
||||
(right-fringe . 8)))
|
||||
)
|
||||
|
||||
(provide 'init-minibuffer)
|
||||
;;; init-minibuffer.el ends here
|
@ -5,46 +5,110 @@
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Aquí se encuentran todas las configuraciones relacionadas a org-mode.
|
||||
;;
|
||||
;; org-mode es un de los reclamos más potentes de Emacs. Aunque solo es
|
||||
;; un formato de texto enrriquecido, básicamente algo similar a
|
||||
;; markdown, Emacs es el que lo ha llevado muy bien y probalemente el que
|
||||
;; mejor lo soporta.
|
||||
;;
|
||||
;; Cabe mencionar que este modo es también el predefinido para todo un
|
||||
;; ecosistema dentro de Emacs, como es el caso de la agenda o la base de
|
||||
;; conocimientos org-roam.
|
||||
|
||||
;;; Code:
|
||||
(defun kj/org-hook ()
|
||||
"Configuración para el hook de 'org-mode'."
|
||||
|
||||
(display-line-numbers-mode 0)
|
||||
(variable-pitch-mode 1)
|
||||
;; (variable-pitch-mode 1)
|
||||
(visual-line-mode 1)
|
||||
(visual-fill-column-mode 1)
|
||||
|
||||
;; Configuracin para Systanx Highlight en porg-blocks
|
||||
(add-to-list 'org-src-lang-modes (cons "html" 'mhtml))
|
||||
|
||||
;; 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-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))
|
||||
(setq org-fontify-quote-and-verse-blocks t) ;; Permitir configuración de bloques quote y verse.
|
||||
;; (set-face-attribute 'org-block nil :underline nil :foreground nil :background "#282a36")
|
||||
;; (set-face-attribute 'org-block-begin-line nil :underline nil :foreground nil :background "#1e1f28")
|
||||
;; (set-face-attribute 'org-block-end-line nil :underline nil :foreground nil :background nil)
|
||||
;; (set-face-attribute 'org-block-end-line nil :background 'unspecified)
|
||||
(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 'org-block nil :background
|
||||
;; (color-darken-name
|
||||
;; (face-attribute 'default :background) 3))
|
||||
|
||||
;; (setq org-src-block-faces '(("emacs-lisp" (:background "#EEE2FF"))
|
||||
;; ("python" (:background "#E5FFB8"))))
|
||||
|
||||
;; 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")
|
||||
|
||||
;; Embellecer las prioridades
|
||||
(setq org-highest-priority ?A
|
||||
org-default-priority ?B
|
||||
org-lowest-priority ?D) ;; Cambiar prioridades de A,B,C a A,B,C,D
|
||||
(push '("[#A]" . "⚡" ) prettify-symbols-alist)
|
||||
(push '("[#B]" . "🔥" ) prettify-symbols-alist)
|
||||
(push '("[#C]" . "🐢" ) prettify-symbols-alist)
|
||||
(push '("[#D]" . "☕" ) prettify-symbols-alist)
|
||||
;; (push '("#+begin_quote" . "❝" ) prettify-symbols-alist)
|
||||
;; (push '("#+end_quote" . "❞" ) prettify-symbols-alist)
|
||||
;; (push '("#+begin_export" . "📤" ) prettify-symbols-alist)
|
||||
;; (push '("#+end_export" . "⎯" ) prettify-symbols-alist)
|
||||
;; (push '("#+begin_comment" . "📝" ) prettify-symbols-alist)
|
||||
;; (push '("#+end_comment" . "⎯" ) prettify-symbols-alist)
|
||||
;; (push '("#+begin_src" . "❯" ) prettify-symbols-alist)
|
||||
;; (push '("#+end_src" . "⎯" ) prettify-symbols-alist)
|
||||
;; (push '("#+begin_example" . "🦉" ) prettify-symbols-alist)
|
||||
;; (push '("#+end_example" . "⎯" ) prettify-symbols-alist)
|
||||
(prettify-symbols-mode)
|
||||
|
||||
;; Habilitar evaluación de lenguajes en org-mode (babel)
|
||||
(org-babel-do-load-languages 'org-babel-load-languages
|
||||
(append org-babel-load-languages
|
||||
'(
|
||||
(C . t)
|
||||
(R . t)
|
||||
(awk . t)
|
||||
(calc . t)
|
||||
(clojure . t)
|
||||
(go . t)
|
||||
(haskell . t)
|
||||
(java . t)
|
||||
(js . t)
|
||||
(php . t)
|
||||
(python . t)
|
||||
(rust . t)
|
||||
(translate . t)
|
||||
(shell . t)
|
||||
)))
|
||||
;; No solicitar confirmación para evaluar
|
||||
(setq org-confirm-babel-evaluate nil)
|
||||
)
|
||||
|
||||
;; org-mode
|
||||
(use-package org
|
||||
:defer t
|
||||
:straight (:type built-in)
|
||||
:bind (("C-c a" . org-agenda)
|
||||
("C-c c" . org-capture))
|
||||
:ensure nil
|
||||
: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)
|
||||
@ -68,19 +132,10 @@
|
||||
'(("TODO" . "#ff6464")
|
||||
("DOING" . "yellow")
|
||||
("DONE" . "green")
|
||||
("WAITING" . "orange")
|
||||
("HOLD" . "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)))
|
||||
@ -100,27 +155,22 @@
|
||||
;; 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)
|
||||
)
|
||||
|
||||
;; Org-yt para soportar embebidos.
|
||||
(use-package org-yt
|
||||
:after org
|
||||
:ensure (:host github :repo "TobiasZawada/org-yt")
|
||||
:config
|
||||
(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)
|
||||
@ -132,34 +182,62 @@
|
||||
(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))
|
||||
(org-mode . org-bullets-mode)
|
||||
:config
|
||||
(setq org-bullets-bullet-list '("◉"
|
||||
"○"
|
||||
"●"
|
||||
"◈"
|
||||
"◇"
|
||||
"◆"
|
||||
"✸"
|
||||
"✳"))
|
||||
)
|
||||
|
||||
;; Mejora visualmente varias cosas de org
|
||||
(use-package org-modern
|
||||
:defer t
|
||||
:ensure t
|
||||
:hook ((org-mode . org-modern-mode)
|
||||
(org-agenda . org-modern-mode))
|
||||
:config
|
||||
;; Me gustan varias cosas por defecto, así que desactivo aquí varias de las "mejoras"
|
||||
(setq org-modern-table nil ;; Mejora visual de las tablas
|
||||
org-modern-table-vertical 1 ;; Grosor de las líneas verticales de las tablas
|
||||
org-modern-table-horizontal 0.2 ;; Grosor de las líneas horizontales de las tablas
|
||||
org-modern-priority nil ;; Mejora de las prioridades (Arriba ya las puse bonitas con prettyfy-symbols, así que mejor está desactivado)
|
||||
org-modern-todo nil ;; Mejora visual a las lista de tareas
|
||||
org-modern-progress nil ;; Mejora visual a las estadísticas de completado de uan tarea (ej: [50%] o [5/9])
|
||||
org-modern-checkbox nil ;; Mejora de los checkboxes (a mi parecer se ven más feos, los por defecto ya están bonitos).
|
||||
org-modern-keyword nil ;; Oculta el "#+" en los keywords de org
|
||||
org-modern-block-name nil ;; Mejora visual para los org blocks (bloques de código, ejemplo, citas, etc.)
|
||||
org-modern-star nil ;; Lista de bullets a usar en los headers (falla si se activa junto a org-bullets).
|
||||
org-modern-list nil)
|
||||
)
|
||||
|
||||
(use-package visual-fill-column
|
||||
:straight t
|
||||
:defer t
|
||||
:after (org)
|
||||
:config
|
||||
;; Tamaño de la columna
|
||||
(setq-default visual-fill-column-width 150)
|
||||
;; Centrar el texto
|
||||
(setq-default visual-fill-column-center-text t)
|
||||
(setq-default visual-fill-column-center-text t
|
||||
visual-fill-column-adjust-for-text-scale nil
|
||||
visual-fill-column-enable-sensible-window-split 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))
|
||||
@ -175,7 +253,6 @@
|
||||
;; 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
|
||||
@ -185,22 +262,66 @@
|
||||
|
||||
;; Continúa el formato de la lista cuando presionas enter.
|
||||
(use-package org-autolist
|
||||
:straight t
|
||||
:defer 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
|
||||
;; Org babel para PHP
|
||||
(use-package ob-php
|
||||
:defer t
|
||||
:ensure t
|
||||
:hook (org-mode . org-fancy-priorities-mode)
|
||||
:ensure t)
|
||||
|
||||
;; Org babel para GO
|
||||
(use-package ob-go
|
||||
:defer t
|
||||
:ensure t)
|
||||
|
||||
;; Org babel para Rust
|
||||
(use-package ob-rust
|
||||
:defer t
|
||||
:ensure t)
|
||||
|
||||
;; Org babel para traducciones (mediante google translate)
|
||||
(use-package ob-translate
|
||||
:defer t
|
||||
:ensure t)
|
||||
|
||||
;; Org mode en modo presentación
|
||||
(use-package org-present
|
||||
:defer t
|
||||
:after (org)
|
||||
:config
|
||||
(setq org-highest-priority ?A
|
||||
org-default-priority ?B
|
||||
org-lowest-priority ?D
|
||||
org-fancy-priorities-list '("⚡" "⬆" "⬇" "☕"))
|
||||
(add-hook 'org-present-mode-hook
|
||||
(lambda ()
|
||||
(org-display-inline-images)
|
||||
(org-present-hide-cursor)
|
||||
(org-present-read-only)
|
||||
))
|
||||
(add-hook 'org-present-mode-quit-hook
|
||||
(lambda ()
|
||||
;; (org-remove-inline-images)
|
||||
(org-present-show-cursor)
|
||||
(org-present-read-write)))
|
||||
|
||||
(add-hook 'org-present-after-navigate-functions
|
||||
(lambda ()
|
||||
;; Show only top-level headlines
|
||||
(org-overview)
|
||||
;; Unfold the current entry
|
||||
(org-show-entry)
|
||||
;; Show only direct subheadings of the slide but don't expand them
|
||||
(org-show-children)
|
||||
))
|
||||
)
|
||||
|
||||
;; Mostrar los caracteres ocultos de org mode al pasar con el cursor.
|
||||
(use-package org-appear
|
||||
:defer t
|
||||
;; :hook (org-mode . org-appear-mode)
|
||||
)
|
||||
|
||||
;; Polymode para org-mode
|
||||
;; (use-package poly-org)
|
||||
|
||||
(provide 'init-org)
|
||||
;;; init-org.el ends here
|
||||
|
@ -5,78 +5,95 @@
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Aquí se encuentran los paquetes de uso general.
|
||||
;;
|
||||
;; Aquellos de uso más específico, por ejemplo, los que
|
||||
;; pertenecen a un lenguaje de programación en específico
|
||||
;; estarán en el respectivo archivo de configuración
|
||||
;; para dicho uso específico.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Mejorar M-x
|
||||
(use-package amx
|
||||
;; Mejora del reemplazo
|
||||
(use-package anzu
|
||||
: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)
|
||||
:bind (([remap query-replace] . anzu-query-replace)
|
||||
([remap query-replace-regexp] . anzu-query-replace-regexp)))
|
||||
|
||||
;; Intercamiar buffers de lugar
|
||||
(use-package buffer-move
|
||||
:straight t
|
||||
:defer 2
|
||||
: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))
|
||||
)
|
||||
|
||||
;; Mostrar la ayuda de eldoc/documentación en un childframe
|
||||
(use-package eldoc-box
|
||||
:defer t
|
||||
:bind ("<f1>" . eldoc-box-help-at-point))
|
||||
|
||||
;; 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))
|
||||
:bind (("C-+" . er/expand-region)
|
||||
("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))
|
||||
;; :hook ((csv-mode . csv-align-mode)
|
||||
;; (csv-mode . csv-header-line))
|
||||
)
|
||||
|
||||
;; Visor de documentos de emacs (soporta de todo: epub, pdf, odt, docx, cbz, etc.)
|
||||
(use-package doc-view
|
||||
:defer t
|
||||
:hook
|
||||
(doc-view-mode . (lambda ()
|
||||
(display-line-numbers-mode 0)))
|
||||
:ensure nil)
|
||||
|
||||
;; Un bonito y sencillo panel de inicio
|
||||
(use-package dashboard
|
||||
:straight t
|
||||
:defer 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))
|
||||
(expand-file-name "duck.svg" user-emacs-directory))
|
||||
(setq dashboard-items '(
|
||||
;; (recents . 10)
|
||||
(agenda . 10)
|
||||
;;(recents . 10)
|
||||
))
|
||||
)
|
||||
|
||||
;; Mover líneas o regiones
|
||||
(use-package drag-stuff
|
||||
;; Coloca en emacs la documentacón distribuída por devdocs.io
|
||||
(use-package devdocs
|
||||
:defer 2)
|
||||
|
||||
;; Sidebar a la derecha con los archivos
|
||||
(use-package dired-sidebar
|
||||
:defer t
|
||||
:straight t
|
||||
:hook
|
||||
(after-init . drag-stuff-global-mode)
|
||||
:hook (dired-mode . hl-line-mode)
|
||||
:bind ([f9] . dired-sidebar-toggle-sidebar)
|
||||
:commands (dired-sidebar-toggle-sidebar)
|
||||
:config
|
||||
(drag-stuff-define-keys))
|
||||
(setq dired-sidebar-theme 'nerd
|
||||
;; dired-sidebar-should-follow-file t
|
||||
;; dired-sidebar-follow-file-idle-delay 0.5
|
||||
))
|
||||
|
||||
;; La línea bonita esa de abajo
|
||||
(use-package doom-modeline
|
||||
:defer t
|
||||
:straight t
|
||||
:after emacs
|
||||
:ensure t
|
||||
:hook (after-init . doom-modeline-mode)
|
||||
:config
|
||||
(doom-modeline-mode)
|
||||
(setq doom-modeline-project-detection 'auto
|
||||
doom-modeline-buffer-file-name-style 'relative-from-project
|
||||
doom-modeline-major-mode-color-icon t
|
||||
@ -84,24 +101,39 @@
|
||||
doom-modeline-indent-info nil
|
||||
doom-modeline-persp-name t))
|
||||
|
||||
;; Emparejamiento automático de comillas, paréntesis, corchetes y llaves
|
||||
(use-package electric-pair
|
||||
;; Modo para edición de arc docker compose
|
||||
(use-package docker-compose-mode
|
||||
:defer t)
|
||||
|
||||
;; Modo para la edición de archivos Dockerfile (y building desde emacs)
|
||||
(use-package dockerfile-mode
|
||||
:defer t
|
||||
:straight (:type built-in)
|
||||
:hook (after-init . electric-pair-mode)
|
||||
:config
|
||||
(setq electric-pair-delete-adjacent-pairs nil))
|
||||
;; Suelo tener podman siempre en lugar de docker, así que lo definimos como el comando a usar
|
||||
(setq dockerfile-mode-command "podman"))
|
||||
|
||||
;; 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))
|
||||
;; Mover líneas o regiones
|
||||
(use-package drag-stuff
|
||||
:defer 1
|
||||
:config
|
||||
(drag-stuff-global-mode)
|
||||
(drag-stuff-define-keys))
|
||||
|
||||
;; Emparejamiento automático de comillas, paréntesis, corchetes y llaves
|
||||
;; (use-package electric-pair
|
||||
;; :defer t
|
||||
;; :ensure nil
|
||||
;; :config
|
||||
;; (electric-pair-mode)
|
||||
;; (setq electric-pair-delete-adjacent-pairs nil))
|
||||
|
||||
;; Cargar las variables de entorno desde la configuración del usuario
|
||||
(use-package exec-path-from-shell
|
||||
:config
|
||||
(exec-path-from-shell-initialize))
|
||||
|
||||
;; Resalta los escapes de secuencia
|
||||
(use-package highlight-escape-sequences
|
||||
:straight t
|
||||
:defer t
|
||||
:hook (prog-mode . hes-mode)
|
||||
:config
|
||||
@ -111,6 +143,7 @@
|
||||
(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)
|
||||
(php-ts-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)
|
||||
@ -122,9 +155,25 @@
|
||||
)
|
||||
)
|
||||
|
||||
;; Resaltar palabras clave como TODO, FIXME, etc. en comentarios del código.
|
||||
(use-package hl-todo
|
||||
:ensure (hl-todo :version (lambda (_) "3.6.0"))
|
||||
:defer t
|
||||
:hook (prog-mode . hl-todo-mode)
|
||||
:config
|
||||
(add-to-list 'hl-todo-keyword-faces '("BUG" . "#d99600")))
|
||||
|
||||
;; Paquete para exportar buffers de emacs a HTML
|
||||
(use-package htmlize
|
||||
:defer t
|
||||
:ensure t)
|
||||
|
||||
;; Permite crear conjuntos de atajos.
|
||||
(use-package hydra
|
||||
:defer t)
|
||||
|
||||
;; Mostrar lo que se está presionando en pantalla
|
||||
(use-package keypression
|
||||
:straight t
|
||||
:defer t
|
||||
:config
|
||||
(setq keypression-use-child-frame t
|
||||
@ -138,169 +187,227 @@
|
||||
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)
|
||||
:defer t)
|
||||
|
||||
;; Multiple vterm
|
||||
(use-package multi-vterm
|
||||
:defer t
|
||||
:straight t
|
||||
:bind* (("C-x tt" . multi-vterm-dedicated-toggle)
|
||||
:after vterm
|
||||
:bind* (("<f5>" . multi-vterm-dedicated-toggle)
|
||||
("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))
|
||||
;; Iconos bonitos para varias cosas
|
||||
(use-package nerd-icons
|
||||
:defer t)
|
||||
|
||||
;; Paquete para manejo de proyectos
|
||||
(use-package projectile
|
||||
;; Usar nerd-icons en dired
|
||||
(use-package nerd-icons-dired
|
||||
: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"))))
|
||||
:after nerd-icons
|
||||
:hook (dired-mode . nerd-icons-dired-mode))
|
||||
|
||||
;; Cambiar el título de la ventana de emacs
|
||||
;; Modo para leer archivos de configuración de nginx
|
||||
(use-package nginx-mode
|
||||
:defer t)
|
||||
|
||||
;; Múltiples modos en un mismo buffer
|
||||
;; (use-package polymode
|
||||
;; :defer t)
|
||||
|
||||
;; Des-minifica / ordena el código
|
||||
(use-package prettier
|
||||
:defer t)
|
||||
|
||||
(use-package project
|
||||
:defer t
|
||||
:ensure nil
|
||||
:config
|
||||
;; Colocamos un título del frame más bonito y útil que el por defecto
|
||||
(setq frame-title-format
|
||||
'(
|
||||
(:eval
|
||||
(let ((project-name (projectile-project-name)))
|
||||
(unless (string= "-" project-name)
|
||||
(let ((project-name (kj/project-name)))
|
||||
(unless (null 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"))
|
||||
;; Correr el código desde el buffer de emacs
|
||||
(use-package quickrun
|
||||
:defer t
|
||||
:ensure t
|
||||
:bind (:map prog-mode-map
|
||||
("C-c C-r" . quickrun)
|
||||
("C-c r f" . quickrun)
|
||||
("C-c r r" . quickrun-region)
|
||||
("C-c r R" . quickrun-replace-region)
|
||||
)
|
||||
|
||||
(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
|
||||
:ensure nil
|
||||
:bind ("C-x C-r" . recentf-open-files)
|
||||
:hook (after-load-theme . recentf-mode)
|
||||
:config
|
||||
(setq recentf-save-file
|
||||
(recentf-expand-file-name (concat temp-dir "/recentf")))
|
||||
(recentf-mode 1))
|
||||
(recentf-expand-file-name (concat temp-dir "/recentf"))
|
||||
recentf-auto-cleanup 'never
|
||||
recentf-keep '(file-remote-p file-readable-p)
|
||||
recentf-max-saved-items 1000
|
||||
recentf-max-menu-items 500))
|
||||
|
||||
;; Busqueda rápida con ripgrep
|
||||
(use-package rg
|
||||
:defer t
|
||||
:straight t
|
||||
:defines projectile-command-map
|
||||
:hook (after-init . rg-enable-default-bindings)
|
||||
;; :hook (elpaca-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)))
|
||||
(setq rg-group-result t
|
||||
rg-show-columns t)
|
||||
(cl-pushnew '("tmpl" . "*.tmpl") rg-custom-type-aliases))
|
||||
|
||||
;; 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"))))
|
||||
:ensure nil
|
||||
:defer t
|
||||
:hook
|
||||
(elpaca-after-init . (lambda()
|
||||
(setq save-place-file (locate-user-emacs-file (concat temp-dir "/places")))
|
||||
(save-place-mode 1)
|
||||
))
|
||||
)
|
||||
|
||||
;; Mejorando el scroll
|
||||
(use-package smooth-scrolling
|
||||
:defer t
|
||||
:straight t
|
||||
:hook (after-init . smooth-scrolling-mode)
|
||||
:config
|
||||
(smooth-scrolling-mode 1)
|
||||
(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
|
||||
;; Ayuda a manipular los archivos con líneas demasiado largas
|
||||
(use-package so-long
|
||||
: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)
|
||||
:ensure nil
|
||||
:bind (:map so-long-mode-map
|
||||
("C-s" . isearch-forward)
|
||||
("C-r" . isearch-backward))
|
||||
:config
|
||||
(setq so-long-variable-overrides
|
||||
'((bidi-inhibit-bpa . t)
|
||||
(bidi-paragraph-direction . left-to-right)
|
||||
(buffer-read-only . nil)
|
||||
(global-hl-line-mode . nil)
|
||||
(line-move-visual . t)
|
||||
(show-paren-mode . nil)
|
||||
(truncate-lines . nil)
|
||||
(which-func-mode . nil)))
|
||||
)
|
||||
|
||||
;; Terminal
|
||||
(use-package vterm :ensure t :defer t :straight t)
|
||||
;; Mecanografía
|
||||
(use-package speed-type
|
||||
:defer t
|
||||
:hook
|
||||
(speed-type-mode . (lambda ()
|
||||
(corfu-mode 0)
|
||||
(display-line-numbers-mode 0)
|
||||
(visual-line-mode 1)
|
||||
(visual-fill-column-mode 1)))
|
||||
:diminish
|
||||
:config
|
||||
(setq speed-type-gb-book-list '(66867 66866 66591 57303 15725 24536)
|
||||
speed-type-min-chars 300
|
||||
speed-type-max-chars 600))
|
||||
|
||||
;; Cuando iniicias un atajo de teclas te muestra las posibilidades
|
||||
;; Tree-sitter :)
|
||||
(use-package treesit
|
||||
:defer t
|
||||
:ensure nil
|
||||
:commands (treesit-install-language-grammar nf/treesit-install-all-languages)
|
||||
:config
|
||||
(setq treesit-language-source-alist
|
||||
'((bash . ("https://github.com/tree-sitter/tree-sitter-bash"))
|
||||
(c . ("https://github.com/tree-sitter/tree-sitter-c"))
|
||||
(cpp . ("https://github.com/tree-sitter/tree-sitter-cpp"))
|
||||
(css . ("https://github.com/tree-sitter/tree-sitter-css"))
|
||||
(go . ("https://github.com/tree-sitter/tree-sitter-go"))
|
||||
(haskell . ("https://github.com/tree-sitter/tree-sitter-haskell"))
|
||||
(html . ("https://github.com/tree-sitter/tree-sitter-html"))
|
||||
(java . ("https://github.com/tree-sitter/tree-sitter-java"))
|
||||
(javascript . ("https://github.com/tree-sitter/tree-sitter-javascript"))
|
||||
(jsdoc . ("https://github.com/tree-sitter/tree-sitter-jsdoc"))
|
||||
(json . ("https://github.com/tree-sitter/tree-sitter-json"))
|
||||
(julia . ("https://github.com/tree-sitter/tree-sitter-julia"))
|
||||
(lua . ("https://github.com/Azganoth/tree-sitter-lua"))
|
||||
(make . ("https://github.com/alemuller/tree-sitter-make"))
|
||||
(python . ("https://github.com/tree-sitter/tree-sitter-python"))
|
||||
(php . ("https://github.com/tree-sitter/tree-sitter-php" "master" "php/src"))
|
||||
(phpdoc . ("https://github.com/claytonrcarter/tree-sitter-phpdoc"))
|
||||
(ruby . ("https://github.com/tree-sitter/tree-sitter-ruby"))
|
||||
(rust . ("https://github.com/tree-sitter/tree-sitter-rust"))
|
||||
(sql . ("https://github.com/m-novikov/tree-sitter-sql"))
|
||||
(toml . ("https://github.com/tree-sitter/tree-sitter-toml"))
|
||||
(tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "tsx/src"))
|
||||
(typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))
|
||||
(zig . ("https://github.com/GrayJack/tree-sitter-zig"))))
|
||||
(defun nf/treesit-install-all-languages ()
|
||||
"Install all languages specified by `treesit-language-source-alist'."
|
||||
(interactive)
|
||||
(let ((languages (mapcar 'car treesit-language-source-alist)))
|
||||
(dolist (lang languages)
|
||||
(treesit-install-language-grammar lang)
|
||||
(message "`%s' parser was installed." lang)
|
||||
(sit-for 0.75)))))
|
||||
|
||||
;; Terminal
|
||||
(use-package vterm
|
||||
:defer t
|
||||
:config
|
||||
(setq tramp-histfile-override nil) ;; Dejamos que se use el history por defecto del servidor remoto
|
||||
(setq vterm-tramp-shells '(("ssh" "/bin/bash")
|
||||
("sshx" "/bin/bash")
|
||||
("docker" "/bin/bash")
|
||||
("podman" "/bin/bash"))) ;; Tanto docker como podman usarán bash cuado se contecte mediante tramp
|
||||
)
|
||||
|
||||
;; Cuando inicias un atajo de teclas te muestra las posibilidades
|
||||
(use-package which-key
|
||||
:defer t
|
||||
:straight t
|
||||
:hook (after-init . which-key-mode))
|
||||
:config
|
||||
(which-key-mode))
|
||||
|
||||
;; Muestra which-key en un frame en el centro en lugar de abajo
|
||||
(use-package which-key-posframe
|
||||
:after which-key
|
||||
:config
|
||||
(which-key-posframe-mode))
|
||||
|
||||
;; Restaurar el estado de los frames
|
||||
(use-package winner
|
||||
:ensure nil
|
||||
:defer t
|
||||
:straight t
|
||||
:hook (after-init . winner-mode))
|
||||
:config
|
||||
(winner-mode))
|
||||
|
||||
;; Emacs Start Up Profiler
|
||||
;; (use-package esup
|
||||
;; :ensure t
|
||||
;; :straight t)
|
||||
;; :defer t)
|
||||
|
||||
(provide 'init-packages)
|
||||
;;; init-packages.el ends here
|
||||
|
38
configs/init-theme.el
Normal file
38
configs/init-theme.el
Normal file
@ -0,0 +1,38 @@
|
||||
;;; init-theme.el --- Carga del theme -*- lexical-binding: t -*-
|
||||
|
||||
;; Author: kj <webmaster@outcontrol.net>
|
||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Desde aquí se puede cambiar la configuración de themes es posible
|
||||
;; activar o desactivar los themes comentando o descomentando las
|
||||
;; líneas que lo configuran.
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Theme dracula (https://draculatheme.com/) // aún lo tengo en l config porque a Ney le gusta
|
||||
(use-package dracula-theme
|
||||
:defer t)
|
||||
|
||||
;; El theme más cercano a adwaita dark que he encontrado
|
||||
(use-package adwaita-dark-theme
|
||||
:defer t)
|
||||
|
||||
;; Themes modus, vienen integrado en emacs en master (~v30)
|
||||
(use-package modus-themes
|
||||
:defer t)
|
||||
|
||||
;; Themes ef
|
||||
(use-package ef-themes
|
||||
:defer t)
|
||||
|
||||
;; Prendemos el theme que elijamos
|
||||
(add-hook 'elpaca-after-init-hook #'(lambda() (load-theme 'ef-dream t)))
|
||||
|
||||
;; Los themes que recomiendo:
|
||||
;; Oscuros: adwaita-dark y ef-dream
|
||||
;; Claros: modus-operandi-tinted y ef-day
|
||||
|
||||
(provide 'init-theme)
|
||||
;;; init-theme.el ends here
|
@ -1,60 +0,0 @@
|
||||
;;; 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
|
111
configs/init-vc.el
Normal file
111
configs/init-vc.el
Normal file
@ -0,0 +1,111 @@
|
||||
;;; init-vc.el --- Configuración del control de versiones -*- lexical-binding: t -*-
|
||||
|
||||
;; Author: kj <webmaster@outcontrol.net>
|
||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Archivo de configuración específico para el control de versiones.
|
||||
;;
|
||||
;; Puedes que hoy en día la norma es usar git para este trabajo,
|
||||
;; la gran mayoría de configuraciones son justamente para el mismo.
|
||||
|
||||
|
||||
;;; Code:
|
||||
|
||||
;; Resolver diferencias entre 2 archivos o versiones del mismo.
|
||||
(use-package ediff
|
||||
:defer t
|
||||
:ensure nil
|
||||
:config
|
||||
(setq ediff-diff-options "")
|
||||
(setq ediff-custom-diff-options "-u")
|
||||
(setq ediff-window-setup-function 'ediff-setup-windows-plain)
|
||||
(setq ediff-split-window-function 'split-window-vertically))
|
||||
|
||||
;; 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
|
||||
:config
|
||||
(global-git-gutter-mode 1)
|
||||
(defhydra hydra-git-gutter (:hint nil)
|
||||
"
|
||||
^Navigation^ | ^Actions^ | ^Others^
|
||||
-^-----------^-+-^----^--------+-^-------^----------
|
||||
_p_: previous | _s_: stage | _m_: mark
|
||||
_n_: next | _r_: revert | _SPC_: toggle info
|
||||
-^-----------^-+-^----^--------+-^-------^----------
|
||||
"
|
||||
("p" git-gutter:previous-hunk)
|
||||
("n" git-gutter:next-hunk)
|
||||
("s" git-gutter:stage-hunk)
|
||||
("r" git-gutter:revert-hunk)
|
||||
("m" git-gutter:mark-hunkmark)
|
||||
("SPC" git-gutter:toggle-popup-hunk))
|
||||
)
|
||||
|
||||
;; Visitar rápidamente viejas versiones de un archivo rápidamente
|
||||
(use-package git-timemachine
|
||||
:defer t)
|
||||
|
||||
;; Generador automatizado de archivos de licencia
|
||||
(use-package license-templates
|
||||
:defer t)
|
||||
|
||||
;; Magia para git
|
||||
(use-package magit
|
||||
:defer t)
|
||||
|
||||
;; Todolist en magit de todos los archivos del projecto.
|
||||
(use-package magit-todos
|
||||
:defer t
|
||||
:config (magit-todos-mode 1))
|
||||
|
||||
;; Modo para resolución de confictos
|
||||
(use-package smerge-mode
|
||||
:ensure nil
|
||||
:defer t
|
||||
:config
|
||||
(defhydra hydra-smerge (:color pink
|
||||
:hint nil)
|
||||
"
|
||||
^Move^ ^Keep^ ^Diff^ ^Other^
|
||||
^^-----------^^-------------------^^---------------------^^-------
|
||||
_n_ext _b_ase _<_: upper/base _C_ombine
|
||||
_p_rev _u_pper _=_: upper/lower _r_esolve
|
||||
^^ _l_ower _>_: base/lower _k_ill current
|
||||
^^ _a_ll _R_efine
|
||||
^^ _RET_: current _E_diff
|
||||
"
|
||||
("n" smerge-next)
|
||||
("p" smerge-prev)
|
||||
("b" smerge-keep-base)
|
||||
("u" smerge-keep-upper)
|
||||
("l" smerge-keep-lower)
|
||||
("a" smerge-keep-all)
|
||||
("RET" smerge-keep-current)
|
||||
("\C-m" smerge-keep-current)
|
||||
("<" smerge-diff-base-upper)
|
||||
("=" smerge-diff-upper-lower)
|
||||
(">" smerge-diff-base-lower)
|
||||
("R" smerge-refine)
|
||||
("E" smerge-ediff)
|
||||
("C" smerge-combine-with-next)
|
||||
("r" smerge-resolve)
|
||||
("k" smerge-kill-current)
|
||||
("q" nil "cancel" :color blue))
|
||||
)
|
||||
|
||||
(use-package transient
|
||||
:defer t)
|
||||
|
||||
;; Mostrar el último commit que modificó la linea actual
|
||||
(use-package vc-msg
|
||||
:defer t
|
||||
:bind (("C-c v" . vc-msg-show)
|
||||
("C-c C-v" . vc-msg-show))
|
||||
)
|
||||
|
||||
|
||||
(provide 'init-vc)
|
||||
;;; init-vc.el ends here
|
@ -5,10 +5,11 @@
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Archivo de configuración para el lenguaje GO
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package go-mode
|
||||
:straight t
|
||||
:defer t)
|
||||
|
||||
(provide 'lang-go)
|
||||
|
@ -1,14 +1,15 @@
|
||||
;;; lang-html.el --- Configuración para el lenguaje PHP -*- lexical-binding: t -*-
|
||||
;;; lang-html.el --- Configuración para el lenguaje HTML -*- lexical-binding: t -*-
|
||||
|
||||
;; Author: kj <webmaster@outcontrol.net>
|
||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Archivo de configuración para el lenguaje HTML
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package web-mode
|
||||
:straight t
|
||||
:defer t
|
||||
:config
|
||||
(setq web-mode-markup-indent-offset 2
|
||||
@ -19,12 +20,15 @@
|
||||
|
||||
)
|
||||
|
||||
(use-package css-mode
|
||||
:defer t
|
||||
:ensure nil
|
||||
:config
|
||||
(setq css-indent-offset 2))
|
||||
|
||||
(use-package auto-rename-tag
|
||||
:straight t (auto-rename-tag :type git :host github :repo "jcs-elpa/auto-rename-tag")
|
||||
:ensure (: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)
|
||||
|
@ -5,22 +5,24 @@
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Archivo de configuración para el lenguaje Javascript
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package js
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure nil
|
||||
:mode
|
||||
("\\.js$" . js-mode)
|
||||
:hook
|
||||
(js-mode . eglot-ensure)
|
||||
:init
|
||||
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . tsx-ts-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode))
|
||||
:config
|
||||
(setq js-indent-level 2))
|
||||
|
||||
;; json-mode
|
||||
(use-package json-mode
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:mode
|
||||
("\\.json$" . json-mode)
|
||||
|
@ -5,21 +5,26 @@
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Archivo de configuración para el lenguaje PHP
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package php-mode
|
||||
(use-package php-ts-mode
|
||||
:defer t
|
||||
:straight t
|
||||
:hook ((php-mode . (lambda ()
|
||||
(local-set-key (kbd "C-c d b") 'php-doc-block) ;; atajo para docblock
|
||||
(company-mode t) ; habilita company mode
|
||||
))
|
||||
;; (php-mode . lsp)
|
||||
)
|
||||
)
|
||||
:mode "\\.php\\'"
|
||||
;; :init
|
||||
;; (add-to-list 'auto-mode-alist '("\\.php\\'" . php-ts-mode))
|
||||
;; :after php-mode
|
||||
:ensure nil)
|
||||
|
||||
;; (use-package php-mode
|
||||
;; :defer t
|
||||
;; :ensure t)
|
||||
|
||||
(use-package php-doc-block
|
||||
:straight (php-doc-block :type git :host github :repo "moskalyovd/emacs-php-doc-block")
|
||||
:after php-ts-mode
|
||||
:bind ("C-c d b" . php-doc-block)
|
||||
:ensure (:host github :repo "moskalyovd/emacs-php-doc-block")
|
||||
)
|
||||
|
||||
(provide 'lang-php)
|
||||
|
@ -1,29 +1,21 @@
|
||||
;;; lang-rust.el --- Configuración para el lenguaje PHP -*- lexical-binding: t -*-
|
||||
;;; lang-rust.el --- Configuración para el lenguaje Rust -*- lexical-binding: t -*-
|
||||
|
||||
;; Author: kj <webmaster@outcontrol.net>
|
||||
;; URL: https://git.kj2.me/kj/confi-emacs-actual
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Archivo de configuración para el lenguaje Rust
|
||||
|
||||
;;; Code:
|
||||
|
||||
(use-package rust-mode
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:init
|
||||
(setq rust-mode-treesitter-derive 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
|
||||
|
BIN
duck-small.png
BIN
duck-small.png
Binary file not shown.
Before Width: | Height: | Size: 59 KiB |
25833
duck.svg
Normal file
25833
duck.svg
Normal file
File diff suppressed because it is too large
Load Diff
After Width: | Height: | Size: 826 KiB |
@ -24,6 +24,7 @@
|
||||
(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 ()
|
||||
"Restaura el garbaje collection luego de iniciar."
|
||||
(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))
|
||||
@ -32,17 +33,32 @@
|
||||
(add-hook 'after-init-hook #'restore-gc-cons-percentage-after-init)
|
||||
(setq gc-cons-percentage (get 'gc-cons-percentage 'value-during-init))
|
||||
|
||||
;; Color de fondo similar al theme para evitar que se vea blanco al iniciar
|
||||
;; (add-to-list 'default-frame-alist '(background-color . "#282a36"))
|
||||
|
||||
;; Permitir solo la búsqueda de archivos a cargar en la config en case sensitive.
|
||||
(setq auto-mode-case-fold nil)
|
||||
|
||||
;; Definimos que la shell por defecto será bash
|
||||
(setq shell-file-name "/bin/bash")
|
||||
|
||||
;; Personalizaciones (Tedrían que ir en init-base, pero por optimización, las pongo acá)
|
||||
(push '(menu-bar-lines . 0) default-frame-alist) ; Quitar menús.
|
||||
(push '(tool-bar-lines . 0) default-frame-alist) ; Quitar toolbar.
|
||||
|
||||
;; 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)
|
||||
;; (push '(ns-transparent-titlebar . t) default-frame-alist)
|
||||
|
||||
;; Resizing the Emacs frame can be a terribly expensive part of changing the
|
||||
;; font. By inhibiting this, we easily halve startup times with fonts that are
|
||||
;; larger than the system default.
|
||||
(setq frame-inhibit-implied-resize t
|
||||
frame-resize-pixelwise t)
|
||||
|
||||
;; Recommended by
|
||||
;; https://github.com/raxod502/straight.el#getting-started to prevent
|
||||
;; pacakge.el stepping on straight's toes.
|
||||
;; pacakge.el stepping on elpaca toes.
|
||||
(setq package-enable-at-startup nil)
|
||||
|
||||
;;; early-init.el ends here
|
||||
|
11
init.el
11
init.el
@ -15,15 +15,16 @@
|
||||
|
||||
;; Paquetes base
|
||||
(require 'init-base)
|
||||
(require 'init-theme)
|
||||
(require 'init-packages)
|
||||
(require 'init-functions)
|
||||
(require 'init-ai)
|
||||
(require 'init-vc)
|
||||
(require 'init-org)
|
||||
;; (require 'init-lsp)
|
||||
(require 'init-eglot)
|
||||
(require 'init-company)
|
||||
(require 'init-treemacs)
|
||||
;;(require 'init-ctags)
|
||||
(require 'init-ivy)
|
||||
(require 'init-corfu)
|
||||
;; (require 'init-ctags)
|
||||
(require 'init-minibuffer)
|
||||
;; (require 'init-evil)
|
||||
(require 'init-keys)
|
||||
|
||||
|
0
private/.custom.el
Normal file
0
private/.custom.el
Normal file
67
readme.md
67
readme.md
@ -1,67 +0,0 @@
|
||||
# Configuración de Emacs actual
|
||||
|
||||
Esta configuración para emacs se podría decir que es la heredera de mi [configuración de emacs inicial](https://git.kj2.me/kj/confi-emacs-inicial), la cual ya llevaba tiempo necesitando una manita de gato para arreglar y mejorar algunas cosas que me resultan cómodas para el uso, ademas de comenzar a utilizar `evil-mode`. Esta configuración bien podría haber sido una rama de la inicial, pero he decidido hacer uno nuevo y si es neceario hacer aquí las ramas.
|
||||
|
||||
## Instalación
|
||||
|
||||
Si deseas clonar mi configuración, puedes clonar este repositorio:
|
||||
|
||||
`git clone --depth 1 https://git.kj2.me/kj/confi-emacs-actual.git ~/.emacs.d`
|
||||
|
||||
Instalación de fonts y libvterm:
|
||||
|
||||
`sudo apt install fonts-firacode fonts-cantarell libvterm cmake`
|
||||
|
||||
Al igual que la versión anterior, puede ser necesario ejecutar el siguiente comando en el minibuffer para tener bien los íconos de neotree:
|
||||
|
||||
`all-the-icons-install-fonts`
|
||||
|
||||
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
|
||||
|
||||
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:
|
||||
|
||||
`sudo systemctl --user start emacs`
|
||||
|
||||
Del mismo modo, igual es recomendable habilitar el autoinicio de este servicio junto con el sistema:
|
||||
|
||||
`sudo systemctl --user enable emacs`
|
||||
|
||||
Y abrir emacs mediante emacsclient.
|
||||
|
||||
## 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.
|
||||
- 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 treemacs.
|
||||
- Con C-F11 puedes maximizar/restaurar.
|
||||
- Con C-S-c se puede comentar / descomentar un región.
|
||||
- Con C-S-d se duplica las líneas.
|
||||
- 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.
|
||||
|
||||
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.
|
||||
|
||||
## Contacto
|
||||
|
||||
Si se tiene alguna pregunta o quieres comentarme alguna corrección, puesto que este git no está abierto a registro, puedes contactarme mediante:
|
||||
|
||||
E-mail: webmaster@outcontol.net
|
||||
Telegram: [https://t.me/keyjay](https://t.me/keyjay)
|
63
readme.org
Normal file
63
readme.org
Normal file
@ -0,0 +1,63 @@
|
||||
#+TITLE: Configuración Emacs
|
||||
#+AUTHOR: KJ
|
||||
#+OPTIONS: toc:nil
|
||||
|
||||
Esta es mi configuración de Emacs personal y está hecha principalmente para funcionar con *Emacs compilado desde el código*, ya que es así como yo lo uso.
|
||||
|
||||
* Instalación
|
||||
|
||||
Si deseas clonar mi configuración, puedes clonar este repositorio:
|
||||
|
||||
#+begin_src bash
|
||||
git clone --depth 1 https://git.kj2.me/kj/confi-emacs-actual.git ~/.emacs.d
|
||||
#+end_src
|
||||
|
||||
Si no ves los íconos bien dentro de Emacs, puedes ejecutar el comando dentro de Emacs (M-x)
|
||||
|
||||
#+begin_src elisp
|
||||
nerd-icons-install-fonts
|
||||
#+end_src
|
||||
|
||||
* Compilación de Emacs
|
||||
|
||||
Si quieres instalar Emacs tal cual lo tengo yo, esta es la configuración de compilación que actualmente uso:
|
||||
|
||||
#+begin_src bash
|
||||
git clone https://git.savannah.gnu.org/git/emacs.git
|
||||
cd emacs
|
||||
./autogen.sh
|
||||
./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games --with-modules --without-libotf --without-m17n-flt --without-gconf --with-native-compilation=yes --with-native-compilation=aot --with-xinput2 --with-pgtk --with-tree-sitter --without-compress-install --with-mailutils
|
||||
|
||||
make -j16
|
||||
make check
|
||||
sudo make install
|
||||
#+end_src
|
||||
|
||||
Las dependencias para compilar pueden cambiar según tu distribución, por lo que queda en tus manos el ajustar lo que sea necesario.
|
||||
|
||||
Como ayuda lo más que puedo dar es que en las distros basadas en Debian puedes usar =apt build-dep emacs= mientras que en las basadas en RHEL (solo lo he probado en Fedora) puedes usar =dnf builddep emacs=. En el caso de las basadas Arch puedes usar AUR.
|
||||
|
||||
* Dependencias
|
||||
|
||||
Normalmente no es usual el tener dependencias reales para que emacs funcione, pero para el funcionamiendo adecuado y sin errores, lo mejor es tener instalado:
|
||||
|
||||
- El font de firacode
|
||||
- cmake
|
||||
- libvterm
|
||||
|
||||
** Languaje Server Protocol (LSP)
|
||||
|
||||
Esta configuración por defecto utiliza [[https://github.com/joaotavora/eglot][eglot]] para LSP con los servidores por defecto. Puedes revisar su documentación para ver lo que necesitas instalar para usar el LSP del lenguaje que necesites.
|
||||
|
||||
Finalmente, recomiendo instalar [[https://github.com/blahgeek/emacs-lsp-booster][emacs-lsp-booster]], la mejora es nimia en general, pero en proyectos grandes esa pequeña mejora es bastante notoria.
|
||||
|
||||
* Atajos de teclas personalizados
|
||||
|
||||
Tengo varios atajos reconfigurados, por lo que recomiento revisar primero que nada el archivo [[./configs/init-keys.el][init-keys.el]] el resto de configuraciones está principalmente en los archivos [[./configs/init-minibuffer.el][init-minibuffer.el]] e [[./configs/init-packages.el][init-packages.el]], dudo que las uses todas y yo mismo no las uso, por lo que con el tiempo las voy eliminando y a veces agrego alguna extra. Con que revises el primer archivo y sepas que =consult-project= está en =C-x p= ya estás servido.
|
||||
|
||||
* Contacto
|
||||
|
||||
Si se tiene alguna pregunta o quieres comentarme alguna corrección, puesto que este git no está abierto a registro, puedes contactarme mediante:
|
||||
|
||||
*Correo*: webmaster@outcontrol.net
|
||||
*Telegram*: [[https://t.me/keyjay][@keyjay]]
|
Reference in New Issue
Block a user