Big re-write :)
I reordered the code in a more clean an organized way. Also this improves a lot the emacs startup time again, bucause after some updates it becomes a bit slow with the old configuration, so i did it again in a new way.
This commit is contained in:
@ -10,26 +10,8 @@
|
||||
|
||||
;;; 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)
|
||||
@ -67,11 +49,11 @@
|
||||
("<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.
|
||||
"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
|
||||
@ -115,37 +97,39 @@
|
||||
;; 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))
|
||||
:hook (vertico-mode . marginalia-mode))
|
||||
|
||||
;; Todolist de todo el projecto desde consult.
|
||||
(use-package consult-todo
|
||||
:demand t
|
||||
:bind ("C-c t" . consult-todo)
|
||||
:defer t)
|
||||
:bind ("C-c t" . consult-todo))
|
||||
|
||||
;; UI para completado del minibuffer
|
||||
(use-package vertico
|
||||
: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)
|
||||
(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)
|
||||
)
|
||||
|
||||
;; 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)))
|
||||
)
|
||||
:functions posframe-poshandler-frame-center
|
||||
:hook (vertico-mode . vertico-posframe-mode)
|
||||
:init (setq vertico-posframe-poshandler
|
||||
#'posframe-poshandler-frame-center
|
||||
vertico-posframe-parameters
|
||||
'((left-fringe . 8)
|
||||
(right-fringe . 8))))
|
||||
|
||||
(provide 'init-minibuffer)
|
||||
;;; init-minibuffer.el ends here
|
||||
|
Reference in New Issue
Block a user