1

Replace company autocompletion package with corfu

This commit is contained in:
Jessie Hildebrandt 2022-06-07 20:28:22 -04:00
parent f15985fb45
commit c27c133f0f

62
init.el
View File

@ -647,32 +647,56 @@
(flycheck-mode-hook . flycheck-package-setup))
;;====================
;; Company (Autocompletion)
;; Corfu (Autocompletion)
;;====================
;; Load Company
(use-package company
:defer
2
:config
(global-company-mode)
;; Load Corfu
(use-package corfu
:demand
t
:custom
(company-idle-delay 0.3)
(company-dabbrev-downcase nil))
(corfu-auto t)
(corfu-echo-documentation nil)
(corfu-min-width 20)
(corfu-max-width 50)
:config
(global-corfu-mode t))
;; [Lua]
;; Load Company-Lua
(use-package company-lua
;; Load Corfu-doc
(use-package corfu-doc
:demand
t
:after
(company)
:hook
(lua-mode my-lua-mode-company-init))
(corfu)
:config
(corfu-doc-mode t)
:bind
(:map corfu-map
("M-p" . corfu-doc-scroll-down)
("M-n" . corfu-doc-scroll-up)
("M-d" . corfu-doc-toggle)))
;; [PHP]
;; Load Company-PHP
(use-package company-php
;; Load Corfu-terminal
(use-package corfu-terminal
:demand
t
:after
(company))
(corfu)
:config
(unless (display-graphic-p)
(corfu-terminal-mode t)))
;; Load kind-icon (Icons for Corfu completion symbols)
(use-package kind-icon
:demand
t
:after
(corfu)
:config
(add-to-list 'corfu-margin-formatters #'kind-icon-margin-formatter)
:custom
(kind-icon-default-face 'corfu-default)
(kind-icon-use-icons nil))
;;====================
;; yasnippet (Snippet Insertion/Completion)