From 9aa077707be0ed5dce56ab548199c5ca13b18e1b Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sat, 9 Sep 2023 12:54:52 +0300 Subject: emacs(dev): Update corfu, completions, add register keys --- .emacs.d/modules/thanos-dev.el | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to '.emacs.d/modules/thanos-dev.el') diff --git a/.emacs.d/modules/thanos-dev.el b/.emacs.d/modules/thanos-dev.el index 3ea2204..1ad2c16 100644 --- a/.emacs.d/modules/thanos-dev.el +++ b/.emacs.d/modules/thanos-dev.el @@ -32,26 +32,21 @@ (require 'orderless) (require 'dabbrev) +;; Completions (setf dabbrev-ignored-buffer-regexps '("\\.\\(?:pdf\\|jpe?g\\|png\\)\\'")) -(defun orderless-fast-dispatch (word index total) - (and (= index 0) (= total 1) (length< word 4) - `(orderless-regexp . ,(concat "^" (regexp-quote word))))) - -(orderless-define-completion-style orderless-fast - (orderless-style-dispatchers '(orderless-fast-dispatch)) - (orderless-matching-styles '(orderless-literal orderless-regexp))) +(setf completion-category-overrides '((file (style basic partial-completion))) + completion-styles '(orderless) + completion-cycle-threshold 2) ;; Corfu (global-corfu-mode) (corfu-popupinfo-mode) (setf corfu-auto t - corfu-auto-delay 0.3 + corfu-auto-delay 0.1 corfu-auto-prefix 2 corfu-cycle t - completion-styles '(orderless-fast basic) - completion-cycle-threshold 3 corfu-popupinfo-delay 0 corfu-quit-at-boundary 'separator corfu-quit-no-match t @@ -61,6 +56,11 @@ (setq indent-tabs-mode nil) +;; Register +(define-key global-map (kbd "C-x r d") 'bookmark-delete) +(define-key global-map (kbd "C-x r C-r") 'bookmark-rename) +(define-key global-map (kbd "C-x r .") 'consult-register) + (defun insert-brackets (&optional arg) "Insert brackets." (interactive "P") -- cgit v1.2.3