summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2022-11-28 15:08:50 +0000
committerYann Herklotz <git@yannherklotz.com>2022-11-28 15:08:50 +0000
commit450ad13b64ab6371aa562a48c682450d4ee847bf (patch)
treeb5626eb71c36d575479c6f1b95053e76e04bf96b
parent8202d8b9a6aef6d84955a7b75dfb2a8cd8b50583 (diff)
downloadymh-emacs-450ad13b64ab6371aa562a48c682450d4ee847bf.tar.gz
ymh-emacs-450ad13b64ab6371aa562a48c682450d4ee847bf.zip
Add consult back and set completion styles
-rw-r--r--init.el31
1 files changed, 30 insertions, 1 deletions
diff --git a/init.el b/init.el
index 54ad984..7156a49 100644
--- a/init.el
+++ b/init.el
@@ -14,6 +14,7 @@
(global-set-key (kbd "C-,") #'ymhg/prev-window)
(global-set-key (kbd "C-\\") #'undo-only)
(global-set-key (kbd "M-SPC") (lambda () (interactive) (insert " ")))
+(global-set-key (kbd "C-<tab>") #'tab-bar-switch-to-recent-tab)
(global-set-key (kbd "C-c l") #'org-store-link)
(global-set-key (kbd "C-c c") #'org-capture)
@@ -60,6 +61,9 @@
(setq-default fill-column 80)
+ (setq completion-cycle-threshold 3)
+ (setq tab-always-indent 'complete)
+
(setq use-short-answers t)
(setq inhibit-startup-message t)
(setq confirm-nonexistent-file-or-buffer nil)
@@ -530,12 +534,37 @@ https://yannherklotz.com"))
(direnv-mode))
(use-package orderless
- :custom (completion-styles '(substring orderless)))
+ :init
+ (setq completion-styles '(substring orderless basic)))
(use-package vertico
:init
+ (setq read-file-name-completion-ignore-case t)
+ (setq read-buffer-completion-ignore-case t)
+ (setq completion-ignore-case t)
+ (setq completion-category-defaults nil)
(vertico-mode))
+(use-package corfu
+ :init
+ (global-corfu-mode))
+
+(use-package consult
+ :bind (("M-s r" . consult-ripgrep)
+ ("M-s g" . consult-git-grep)
+ ("C-h a" . consult-apropos)
+ ("M-s m" . consult-man)
+ ("M-s h" . consult-org-heading)))
+
+(use-package dabbrev
+ :straight nil
+ ;; Swap M-/ and C-M-/
+ :bind (("M-/" . dabbrev-completion)
+ ("C-M-/" . dabbrev-expand))
+ ;; Other useful Dabbrev configurations.
+ :custom
+ (dabbrev-ignored-buffer-regexps '("\\.\\(?:pdf\\|jpe?g\\|png\\)\\'")))
+
(use-package sendmail
:init
(setq mail-specify-envelope-from t)