Replace company autocompletion package with corfu
This commit is contained in:
parent
f15985fb45
commit
c27c133f0f
62
init.el
62
init.el
@ -647,32 +647,56 @@
|
|||||||
(flycheck-mode-hook . flycheck-package-setup))
|
(flycheck-mode-hook . flycheck-package-setup))
|
||||||
|
|
||||||
;;====================
|
;;====================
|
||||||
;; Company (Autocompletion)
|
;; Corfu (Autocompletion)
|
||||||
;;====================
|
;;====================
|
||||||
|
|
||||||
;; Load Company
|
;; Load Corfu
|
||||||
(use-package company
|
(use-package corfu
|
||||||
:defer
|
:demand
|
||||||
2
|
t
|
||||||
:config
|
|
||||||
(global-company-mode)
|
|
||||||
:custom
|
:custom
|
||||||
(company-idle-delay 0.3)
|
(corfu-auto t)
|
||||||
(company-dabbrev-downcase nil))
|
(corfu-echo-documentation nil)
|
||||||
|
(corfu-min-width 20)
|
||||||
|
(corfu-max-width 50)
|
||||||
|
:config
|
||||||
|
(global-corfu-mode t))
|
||||||
|
|
||||||
;; [Lua]
|
;; Load Corfu-doc
|
||||||
;; Load Company-Lua
|
(use-package corfu-doc
|
||||||
(use-package company-lua
|
:demand
|
||||||
|
t
|
||||||
:after
|
:after
|
||||||
(company)
|
(corfu)
|
||||||
:hook
|
:config
|
||||||
(lua-mode my-lua-mode-company-init))
|
(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 Corfu-terminal
|
||||||
;; Load Company-PHP
|
(use-package corfu-terminal
|
||||||
(use-package company-php
|
:demand
|
||||||
|
t
|
||||||
:after
|
: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)
|
;; yasnippet (Snippet Insertion/Completion)
|
||||||
|
Loading…
Reference in New Issue
Block a user