diff --git a/config.org b/config.org index 2d8236c..38a93e4 100644 --- a/config.org +++ b/config.org @@ -449,6 +449,7 @@ Exclude some dirs from spamming recentf (savehist-file (concat MY--PATH_USER_LOCAL "history"))) #+end_src + * undo #+BEGIN_SRC emacs-lisp (use-package undo-tree @@ -657,18 +658,88 @@ Also replaces ace-window for buffer switching. "m r" '(avy-move-region :which-key "avy move region"))) #+END_SRC -* Vertico & Orderless -Vertico is a completion ui. -Orderless orders the suggestions by recency. The package prescient orders by frequency. +* Vertico +Vertico is a completion ui for the minibuffer and replaced selectrum. [[https://github.com/minad/vertico][Vertico Github]] -[[https://github.com/oantolin/orderless][Orderless Github]] + #+begin_src emacs-lisp ;; completion ui (use-package vertico :ensure t :init (vertico-mode)) +#+end_src + +* Corfu +Completion ui, replaces company. +[[https://github.com/minad/corfu][Corfu Github]] + +#+begin_src emacs-lisp +(use-package corfu + :ensure t + :after savehist + :custom + (corfu-popupinfo-delay t) + (corfu-auto t) + (corfu-cycle t) + (corfu-auto-delay 0.0) + (corfu-preselect-first nil) + :init + (global-corfu-mode) + (corfu-popupinfo-mode) + (corfu-history-mode) + ;; belongs to emacs + (add-to-list 'savehist-additional-variables 'corfu-history)) + +(use-package emacs + :init + ;; hide commands in M-x which do not apply to current mode + (setq read-extended-command-predicate #'command-completion-default-include-p) + ;; enable indentation + completion using TAB + (setq tab-always-indent 'complete)) +#+end_src + +* Cape +Adds completions for corfu +[[https://github.com/minad/cape][Cape Github]] + +Available functions: +dabbrev, file, history, keyword, tex, sgml, rfc1345, abbrev, ispell, dict, symbol, line + +#+begin_src emacs-lisp +(use-package cape + :ensure t + :bind + (("C-c p p" . completion-at-point) ;; capf + ("C-c p t" . complete-tag) ;; etags + ("C-c p d" . cape-dabbrev) + ("C-c p h" . cape-history) + ("C-c p f" . cape-file)) + :init + (add-to-list 'completion-at-point-functions #'cape-dabbrev) + (add-to-list 'completion-at-point-functions #'cape-file) + (add-to-list 'completion-at-point-functions #'cape-history)) +#+end_src +* kind-icon +Make corfu pretty +[[https://github.com/jdtsmith/kind-icon][kind-icon Github]] + +#+begin_src emacs-lisp +(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)) +#+end_src + +* Orderless +[[https://github.com/oantolin/orderless][Orderless Github]] +Orderless orders the suggestions by recency. The package prescient orders by frequency. + +#+begin_src emacs-lisp (use-package orderless :ensure t :init @@ -676,6 +747,7 @@ Orderless orders the suggestions by recency. The package prescient orders by fre completion-category-defaults nil completion-category-overrides '((file (styles partial-completion))))) #+end_src + * Consult [[https://github.com/minad/consult][Github]] @@ -862,7 +934,7 @@ End Sub :diminish auto-revert-mode) #+end_src -* company +* COMMENT company (now corfu) #+BEGIN_SRC emacs-lisp (use-package company :defer 1