first commit
This commit is contained in:
50
lisp/init-completion.el
Normal file
50
lisp/init-completion.el
Normal file
@@ -0,0 +1,50 @@
|
||||
;;; init-completion.el
|
||||
;;; -*- lexical-binding: t -*-
|
||||
|
||||
;; eglot
|
||||
(use-package eglot
|
||||
:hook ((python-mode . eglot-ensure))
|
||||
|
||||
:config
|
||||
(setq eglot-send-changes-idle-time 0.5))
|
||||
|
||||
;; corfu
|
||||
(use-package corfu
|
||||
:custom
|
||||
(corfu-cycle t) ;; Enable cycling for `corfu-next/previous'
|
||||
|
||||
:init
|
||||
(global-corfu-mode)
|
||||
(corfu-history-mode)
|
||||
(corfu-popupinfo-mode)
|
||||
(corfu-echo-mode)
|
||||
|
||||
:custom
|
||||
(corfu-popupinfo-delay 0.5)
|
||||
(corfu-auto t)
|
||||
|
||||
:bind
|
||||
(:map corfu-map
|
||||
("RET" . nil)))
|
||||
|
||||
(use-package emacs
|
||||
:custom
|
||||
(tab-always-indent 'complete)
|
||||
|
||||
;; Emacs 30 and newer: Disable Ispell completion function.
|
||||
;; Try `cape-dict' as an alternative.
|
||||
(text-mode-ispell-word-completion nil)
|
||||
|
||||
;; Hide commands in M-x which do not apply to the current mode. Corfu
|
||||
;; commands are hidden, since they are not used via M-x. This setting is
|
||||
;; useful beyond Corfu.
|
||||
(read-extended-command-predicate #'command-completion-default-include-p))
|
||||
|
||||
;; cape
|
||||
(use-package cape
|
||||
:init
|
||||
(add-to-list 'completion-at-point-functions #'cape-file) ;; 文件补全
|
||||
(setq-local completion-at-point-functions
|
||||
(list (cape-capf-super #'cape-dabbrev)))) ;; 启用dabbrev
|
||||
|
||||
(provide 'init-completion)
|
||||
Reference in New Issue
Block a user