dev: merging latest changes from pr7002
This commit is contained in:
commit
ff96216cd7
1 changed files with 16 additions and 4 deletions
|
@ -9,7 +9,9 @@ major mode regardless of size.")
|
|||
;;
|
||||
;;; Packages
|
||||
(use-package! corfu
|
||||
:hook ((doom-first-buffer . global-corfu-mode))
|
||||
:defer t
|
||||
:init
|
||||
(global-corfu-mode)
|
||||
:config
|
||||
(setq corfu-auto t
|
||||
corfu-auto-delay 0.1
|
||||
|
@ -36,11 +38,21 @@ major mode regardless of size.")
|
|||
(add-to-list 'completion-category-overrides `(lsp-capf (styles ,@completion-styles)))
|
||||
|
||||
(map! :map corfu-mode-map
|
||||
:eig "C-SPC" #'completion-at-point
|
||||
:mnor "C-SPC" (cmd! (call-interactively #'evil-insert-state)
|
||||
(call-interactively #'completion-at-point))
|
||||
:e "C-M-i" #'completion-at-point
|
||||
:i "C-SPC" #'completion-at-point
|
||||
:n "C-SPC" (cmd! (call-interactively #'evil-insert-state)
|
||||
(call-interactively #'completion-at-point))
|
||||
:v "C-SPC" (cmd! (call-interactively #'evil-change)
|
||||
(call-interactively #'completion-at-point)))
|
||||
(map! :unless (modulep! :editor evil)
|
||||
:map corfu-mode-map
|
||||
"C-M-i" #'completion-at-point)
|
||||
|
||||
(add-hook! corfu-mode
|
||||
(defun +corfu-mode-binds ()
|
||||
;; In `corfu-mode', unbind C-SPC from `global-map', so Emacs keeps searching.
|
||||
(make-local-variable 'global-map)
|
||||
(unbind-key "C-SPC" 'global-map)))
|
||||
|
||||
(defun +corfu-enable-in-minibuffer ()
|
||||
"Enable Corfu in the minibuffer if `completion-at-point' is bound."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue