summaryrefslogtreecommitdiff
path: root/.emacs.d
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2023-09-09 12:54:52 +0300
committerThanos Apollo <[email protected]>2023-09-09 12:54:52 +0300
commit9aa077707be0ed5dce56ab548199c5ca13b18e1b (patch)
tree260db92514bf6edf9c1cb273924bbc8727464441 /.emacs.d
parent247a6eb04a01936e33cf0bb2a9c07b9d13a44f5c (diff)
emacs(dev): Update corfu, completions, add register keys
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/modules/thanos-dev.el20
1 files changed, 10 insertions, 10 deletions
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")