Add corfu to Emacs config

This commit is contained in:
2022-10-09 22:59:55 -07:00
parent 223e177315
commit 5d1066f6ed
2 changed files with 62 additions and 1 deletions

View File

@@ -354,7 +354,38 @@ When in indent-rigidly mode (=+= in normal state), use =H/L= to adjust indent by
(meow-global-mode 1))
#+end_src
** TODO Autocompletion
** Autocompletion
#+begin_src emacs-lisp
(use-package corfu
:straight t
;; Optional customizations
;; :custom
;; (corfu-cycle t) ;; Enable cycling for `corfu-next/previous'
;; (corfu-auto t) ;; Enable auto completion
;; (corfu-separator ?\s) ;; Orderless field separator
;; (corfu-quit-at-boundary nil) ;; Never quit at completion boundary
;; (corfu-quit-no-match nil) ;; Never quit, even if there is no match
;; (corfu-preview-current nil) ;; Disable current candidate preview
;; (corfu-preselect-first nil) ;; Disable candidate preselection
;; (corfu-on-exact-match nil) ;; Configure handling of exact matches
;; (corfu-echo-documentation nil) ;; Disable documentation in the echo area
;; (corfu-scroll-margin 5) ;; Use scroll margin
;; Enable Corfu only for certain modes.
;; :hook ((prog-mode . corfu-mode)
;; (shell-mode . corfu-mode)
;; (eshell-mode . corfu-mode))
;; Recommended: Enable Corfu globally.
;; This is recommended since Dabbrev can be used globally (M-/).
;; See also `corfu-excluded-modes'.
:init
(global-corfu-mode))
(use-package emacs
:init
(setq tab-always-indent 'complete))
#+end_src
* Org
#+begin_src emacs-lisp
(use-package org