Change from package.el to straight.el.
This commit is contained in:
@ -8,11 +8,14 @@
|
||||
;;; Code:
|
||||
|
||||
;; Iconos principalmente para ser usados por neotree
|
||||
(use-package all-the-icons :defer t)
|
||||
(use-package all-the-icons
|
||||
:defer t
|
||||
:straight t)
|
||||
|
||||
;; Iconos en Ivy (allthe icons)
|
||||
(use-package all-the-icons-ivy-rich
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:init
|
||||
(all-the-icons-ivy-rich-mode 1)
|
||||
@ -22,30 +25,16 @@
|
||||
;; Reemplazar y buscar mejorado
|
||||
(use-package anzu
|
||||
:ensure t
|
||||
:straight t
|
||||
:config
|
||||
(global-anzu-mode +1)
|
||||
(global-set-key [remap query-replace] 'anzu-query-replace)
|
||||
(global-set-key [remap query-replace-regexp] 'anzu-query-replace-regexp))
|
||||
|
||||
;; Auto-actualizar los paquetes
|
||||
(use-package auto-package-update
|
||||
:defer t
|
||||
:custom
|
||||
(auto-package-update-interval 7)
|
||||
(auto-package-update-prompt-before-update t)
|
||||
(auto-package-update-hide-results t)
|
||||
:config
|
||||
(auto-package-update-at-time "06:00")
|
||||
:init
|
||||
(setq
|
||||
auto-package-update-last-update-day-filename
|
||||
(expand-file-name ".last-package-update-day" private-dir))
|
||||
(setq use-package-always-ensure t)
|
||||
(auto-package-update-maybe))
|
||||
|
||||
;; Automcompletado
|
||||
(use-package company
|
||||
:defer t
|
||||
:straight t
|
||||
:init
|
||||
(global-company-mode)
|
||||
:config
|
||||
@ -60,15 +49,18 @@
|
||||
|
||||
;; Hacer que el autocompletado se vea más bonito con íconos
|
||||
(use-package company-box
|
||||
:straight t
|
||||
:defer t
|
||||
:hook (company-mode . company-box-mode))
|
||||
:init
|
||||
(company-box-mode 1))
|
||||
|
||||
;; Usar autocompletado con ctags y company
|
||||
(use-package company-ctags :defer t)
|
||||
(use-package company-ctags :defer t :straight t)
|
||||
|
||||
;; Poner la info acerca del autocompletado del autocompletado mas rápido
|
||||
(use-package company-quickhelp
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:custom
|
||||
(company-quickhelp-delay 2)
|
||||
@ -77,22 +69,25 @@
|
||||
;; Autocompletado para shell scripting.
|
||||
(use-package company-shell
|
||||
:defer t
|
||||
:straight t
|
||||
:config
|
||||
(add-to-list 'company-backends '(company-shell company-shell-env company-fish-shell))
|
||||
)
|
||||
|
||||
;; Autocompletado para el minibuffer (counsel e ivy)
|
||||
(use-package counsel :defer t)
|
||||
(use-package counsel :straight t :defer t)
|
||||
|
||||
;; Autocompletado de proyectos en counsel (projectile)
|
||||
(use-package counsel-projectile
|
||||
:defer t
|
||||
:straight t
|
||||
:config
|
||||
(counsel-projectile-mode))
|
||||
|
||||
;; Un bonito y sencillo panel de inicio
|
||||
(use-package dashboard
|
||||
:defer t
|
||||
:straight t
|
||||
:init
|
||||
(dashboard-setup-startup-hook)
|
||||
:config
|
||||
@ -110,6 +105,7 @@
|
||||
;; Mover líneas o regiones
|
||||
(use-package drag-stuff
|
||||
:defer t
|
||||
:straight t
|
||||
:init
|
||||
(drag-stuff-global-mode 1)
|
||||
:config
|
||||
@ -118,6 +114,7 @@
|
||||
;; La línea bonita esa de abajo
|
||||
(use-package doom-modeline
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:init (doom-modeline-mode 1)
|
||||
:config
|
||||
@ -131,29 +128,34 @@
|
||||
;; Emmet - Una ayuda para escribir HTML rápidamente (escribre doc, luego preciona C-j y lo entenderás)
|
||||
(use-package emmet-mode
|
||||
:defer t
|
||||
:straight t
|
||||
:hook (html-mode . emmet-mode))
|
||||
|
||||
;; Revisar sintaxis en vivo
|
||||
(use-package flycheck
|
||||
;; :diminish flycheck-mode
|
||||
:defer t
|
||||
:straight t
|
||||
:hook (after-init . global-flycheck-mode) ; Habilitar flycheck en todos los modos
|
||||
)
|
||||
|
||||
;; Mostrar los errores de flycheck en un pop up
|
||||
(use-package flycheck-popup-tip
|
||||
:defer t
|
||||
:straight t
|
||||
:hook (flycheck-mode . flycheck-popup-tip-mode))
|
||||
|
||||
;; 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
|
||||
:init
|
||||
(global-git-gutter-mode +1))
|
||||
|
||||
;; Highlight en los números.
|
||||
(use-package highlight-numbers
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:hook
|
||||
(prog-mode . highlight-numbers-mode))
|
||||
@ -161,6 +163,7 @@
|
||||
;; Mostrar info del panel inferior de otra manera
|
||||
(use-package ivy
|
||||
:defer t
|
||||
:straight t
|
||||
:config
|
||||
(ivy-mode 1)
|
||||
(setq ivy-use-virtual-buffers nil)
|
||||
@ -168,6 +171,7 @@
|
||||
|
||||
(use-package ivy-rich
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:config
|
||||
(ivy-rich-mode 1))
|
||||
@ -175,32 +179,41 @@
|
||||
;; Languaje server protocol
|
||||
(use-package lsp-mode
|
||||
:defer t
|
||||
:straight t
|
||||
:custom
|
||||
(lsp-headerline-breadcrumb-enable nil)
|
||||
:config
|
||||
(setq lsp-completion-provider :none))
|
||||
|
||||
;; Interface para lsp
|
||||
(use-package lsp-ui :defer t)
|
||||
(use-package lsp-ui
|
||||
:defer t
|
||||
:straight t)
|
||||
|
||||
;; Magia para git
|
||||
(use-package magit :defer t)
|
||||
(use-package magit
|
||||
:defer t
|
||||
:straight t)
|
||||
|
||||
;; Modo markdown
|
||||
(use-package markdown-mode :defer t)
|
||||
(use-package markdown-mode
|
||||
:defer t
|
||||
:straight t)
|
||||
|
||||
;; Multiple vterm
|
||||
(use-package multi-vterm :ensure t :defer t)
|
||||
(use-package multi-vterm :ensure t :defer t :straight t)
|
||||
|
||||
;; Code Folding
|
||||
(use-package origami
|
||||
:defer t
|
||||
:straight t
|
||||
:init
|
||||
(global-origami-mode))
|
||||
|
||||
;; Paquete para manejo de proyectos
|
||||
(use-package projectile
|
||||
:defer t
|
||||
:straight t
|
||||
:diminish projectile-mode
|
||||
:custom ((projectile-completion-system 'ivy))
|
||||
:init
|
||||
@ -234,6 +247,7 @@
|
||||
;; Recentf - Guarda registro de los archivos abiertos recientemente
|
||||
(use-package recentf
|
||||
:defer t
|
||||
:straight t
|
||||
:config
|
||||
(setq recentf-save-file
|
||||
(recentf-expand-file-name (concat temp-dir "/recentf")))
|
||||
@ -242,6 +256,7 @@
|
||||
;; Guardar la posición del cursor en un archivo para volver allí cuando se lo vuelva a abrir.
|
||||
(use-package saveplace
|
||||
:defer t
|
||||
:straight t
|
||||
:init
|
||||
(save-place-mode 1)
|
||||
:config
|
||||
@ -250,12 +265,14 @@
|
||||
;; Autocompletado de parentesis, corchetes, llaves, etc.
|
||||
(use-package smartparens
|
||||
:defer t
|
||||
:straight t
|
||||
:init
|
||||
(smartparens-global-mode t))
|
||||
|
||||
;; Mejorando el scroll
|
||||
(use-package smooth-scrolling
|
||||
:defer t
|
||||
:straight t
|
||||
:init
|
||||
(smooth-scrolling-mode 1)
|
||||
:config
|
||||
@ -264,38 +281,42 @@
|
||||
(setq mouse-wheel-progressive-speed nil) ; Deshabilita la velocidad progresiva del scroll (mientras más scroll haces, mas rápido va)
|
||||
)
|
||||
|
||||
;; use-package - No necesita presentación
|
||||
(use-package use-package :defer t)
|
||||
;; use-package - No
|
||||
(use-package use-package :defer t :straight t)
|
||||
|
||||
;; Terminal
|
||||
(use-package vterm :ensure t :defer t)
|
||||
(use-package vterm :ensure t :defer t :straight t)
|
||||
|
||||
;; Cuando iniicias un atajo de teclas te muestra las posibilidades
|
||||
(use-package which-key
|
||||
:defer t
|
||||
:straight t
|
||||
:init
|
||||
(which-key-mode))
|
||||
|
||||
;; Restaurar el estado de los frames
|
||||
(use-package winner
|
||||
:defer t
|
||||
:straight t
|
||||
:init
|
||||
(winner-mode 1))
|
||||
|
||||
;; Permitir snippets
|
||||
(use-package yasnippet
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:custom
|
||||
(yas-prompt-functions '(yas-completing-prompt))
|
||||
:config
|
||||
(yas-reload-all)
|
||||
:hook
|
||||
((prog-mode feature-mode) . yas-minor-mode-on)
|
||||
(html-mode . yas-minor-mode))
|
||||
|
||||
;; Coleción de snippets
|
||||
(use-package yasnippet-snippets :ensure t :defer t)
|
||||
(use-package yasnippet-snippets
|
||||
:ensure t
|
||||
:defer t
|
||||
:straight t)
|
||||
|
||||
;; Org-Mode
|
||||
(require 'org-config)
|
||||
|
@ -23,33 +23,47 @@
|
||||
(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/raxod502/straight.el/develop/install.el"
|
||||
'silent 'inhibit-cookies)
|
||||
(goto-char (point-max))
|
||||
(eval-print-last-sexp)))
|
||||
(load bootstrap-file nil 'nomessage))
|
||||
|
||||
;; Initialize package sources
|
||||
(require 'package)
|
||||
;; (require 'package)
|
||||
|
||||
(setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||
("org" . "https://orgmode.org/elpa/")
|
||||
("elpa" . "https://elpa.gnu.org/packages/")))
|
||||
;; (setq package-archives '(("melpa" . "https://melpa.org/packages/")
|
||||
;; ("org" . "https://orgmode.org/elpa/")
|
||||
;; ("elpa" . "https://elpa.gnu.org/packages/")))
|
||||
|
||||
(package-initialize)
|
||||
;; (package-initialize)
|
||||
|
||||
;; Actualizar repositorios si aún no esta actualizados
|
||||
(unless package-archive-contents
|
||||
(package-refresh-contents))
|
||||
;; (unless package-archive-contents
|
||||
;; (package-refresh-contents))
|
||||
|
||||
;; Instalar use-package si no está instalado
|
||||
(unless (package-installed-p 'use-package)
|
||||
(package-install 'use-package))
|
||||
(straight-use-package 'use-package)
|
||||
|
||||
;; 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))
|
||||
;;(unless (package-installed-p 'use-package)
|
||||
;; (package-install 'use-package))
|
||||
|
||||
(defconst private-dir (expand-file-name "private" user-emacs-directory))
|
||||
(defconst temp-dir (format "%s/cache" private-dir)
|
||||
|
@ -8,6 +8,7 @@
|
||||
;;; Code:
|
||||
|
||||
(use-package go-mode
|
||||
:straight t
|
||||
:defer t)
|
||||
|
||||
(provide 'lang-go)
|
||||
|
@ -9,6 +9,7 @@
|
||||
|
||||
(use-package js
|
||||
:defer t
|
||||
:straight t
|
||||
:mode
|
||||
("\\.js$" . js-mode)
|
||||
:config
|
||||
@ -17,6 +18,7 @@
|
||||
;; json-mode
|
||||
(use-package json-mode
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:mode
|
||||
("\\.json$" . json-mode)
|
||||
|
@ -12,17 +12,19 @@
|
||||
|
||||
(use-package php-mode
|
||||
:defer t
|
||||
:hook (php-mode . lsp)
|
||||
:hook (php-mode . (lambda ()
|
||||
: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
|
||||
;;(ac-php-core-eldoc-setup) ; habilita soporte para ELDoc
|
||||
;;(add-to-list 'company-backends '(company-capf company-ac-php-backend :with company-yasnippet)) ; Agregar ac-php para a company
|
||||
))
|
||||
(php-mode . lsp)
|
||||
)
|
||||
)
|
||||
|
||||
(use-package php-doc-block
|
||||
:load-path (lambda() (concat private-dir "/packages/php-doc-block"))
|
||||
:straight (php-doc-block :type git :host github :repo "moskalyovd/emacs-php-doc-block")
|
||||
)
|
||||
|
||||
(provide 'lang-php)
|
||||
|
@ -9,12 +9,14 @@
|
||||
|
||||
(use-package rust-mode
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:config
|
||||
(setq rust-format-on-save t))
|
||||
|
||||
(use-package rustic
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:config
|
||||
;;(setq rustic-lsp-server 'rls)
|
||||
|
@ -37,7 +37,8 @@
|
||||
|
||||
(use-package org
|
||||
:defer t
|
||||
:pin org
|
||||
:ensure t
|
||||
:straight (:type built-in)
|
||||
:hook
|
||||
(org-mode . kj/org-hook)
|
||||
:config
|
||||
@ -127,10 +128,12 @@
|
||||
|
||||
(use-package org-bullets
|
||||
:defer t
|
||||
:straight t
|
||||
:hook
|
||||
(org-mode . org-bullets-mode))
|
||||
|
||||
(use-package visual-fill-column
|
||||
:straight t
|
||||
:config
|
||||
;; Tamaño de la columna
|
||||
(setq-default visual-fill-column-width 150)
|
||||
@ -140,6 +143,7 @@
|
||||
|
||||
(use-package org-roam
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:init
|
||||
(setq org-roam-v2-ack t)
|
||||
@ -152,6 +156,7 @@
|
||||
|
||||
(use-package org-roam-ui
|
||||
:defer t
|
||||
:straight t
|
||||
:ensure t
|
||||
:config
|
||||
(setq org-roam-ui-sync-theme t
|
||||
|
Reference in New Issue
Block a user