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
|
;;; Packages
|
||||||
(use-package! corfu
|
(use-package! corfu
|
||||||
:hook ((doom-first-buffer . global-corfu-mode))
|
:defer t
|
||||||
|
:init
|
||||||
|
(global-corfu-mode)
|
||||||
:config
|
:config
|
||||||
(setq corfu-auto t
|
(setq corfu-auto t
|
||||||
corfu-auto-delay 0.1
|
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)))
|
(add-to-list 'completion-category-overrides `(lsp-capf (styles ,@completion-styles)))
|
||||||
|
|
||||||
(map! :map corfu-mode-map
|
(map! :map corfu-mode-map
|
||||||
:eig "C-SPC" #'completion-at-point
|
:e "C-M-i" #'completion-at-point
|
||||||
:mnor "C-SPC" (cmd! (call-interactively #'evil-insert-state)
|
:i "C-SPC" #'completion-at-point
|
||||||
(call-interactively #'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)
|
:v "C-SPC" (cmd! (call-interactively #'evil-change)
|
||||||
(call-interactively #'completion-at-point)))
|
(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 ()
|
(defun +corfu-enable-in-minibuffer ()
|
||||||
"Enable Corfu in the minibuffer if `completion-at-point' is bound."
|
"Enable Corfu in the minibuffer if `completion-at-point' is bound."
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue