dev: merging from main
This commit is contained in:
commit
9c0e95af1c
20 changed files with 237 additions and 140 deletions
|
@ -1,7 +1,7 @@
|
|||
;;; completion/corfu/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +corfu-move-to-minibuffer ()
|
||||
(defun +corfu/move-to-minibuffer ()
|
||||
"Move the current list of candidates to your choice of minibuffer completion UI."
|
||||
(interactive)
|
||||
(pcase completion-in-region--data
|
||||
|
@ -27,7 +27,7 @@
|
|||
(t (error "No minibuffer completion UI available for moving to!")))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +corfu-smart-sep-toggle-escape ()
|
||||
(defun +corfu/smart-sep-toggle-escape ()
|
||||
"Insert `corfu-separator' or toggle escape if it's already there."
|
||||
(interactive)
|
||||
(cond ((and (char-equal (char-before) corfu-separator)
|
||||
|
@ -37,3 +37,13 @@
|
|||
(save-excursion (backward-char 1)
|
||||
(insert-char ?\\)))
|
||||
(t (call-interactively #'corfu-insert-separator))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +corfu/dabbrev-this-buffer ()
|
||||
"Like `cape-dabbrev', but only scans current buffer."
|
||||
(interactive)
|
||||
(require 'cape)
|
||||
(let ((cape-dabbrev-check-other-buffers nil))
|
||||
(cape-dabbrev t)))
|
||||
|
||||
;;; end of autoload.el
|
||||
|
|
|
@ -74,8 +74,8 @@ TAB/S-TAB.")
|
|||
tab-always-indent 'complete)
|
||||
(add-to-list 'completion-category-overrides `(lsp-capf (styles ,@completion-styles)))
|
||||
(add-to-list 'corfu-auto-commands #'lispy-colon)
|
||||
(add-to-list 'corfu-continue-commands #'+corfu-move-to-minibuffer)
|
||||
(add-to-list 'corfu-continue-commands #'+corfu-smart-sep-toggle-escape)
|
||||
(add-to-list 'corfu-continue-commands #'+corfu/move-to-minibuffer)
|
||||
(add-to-list 'corfu-continue-commands #'+corfu/smart-sep-toggle-escape)
|
||||
(add-hook 'evil-insert-state-exit-hook #'corfu-quit)
|
||||
|
||||
;; HACK: If you want to update the visual hints after completing minibuffer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue