From b53d7bcc85d2c85ee1da87710f132315524009d8 Mon Sep 17 00:00:00 2001 From: gered Date: Sun, 8 Dec 2024 14:01:52 -0500 Subject: [PATCH] adjust code completion settings - switch away from using tab to trigger completion. i find it annoying when & how tab is "overloaded" with completion and indentation. using ctrl+space for completion feels a bit more normal to me anyway. - turn on auto completion pop-up triggering --- emacs.d/editing.el | 12 ++++++++---- emacs.d/keybinds.el | 2 ++ 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/emacs.d/editing.el b/emacs.d/editing.el index 8b7988c..0138fcf 100644 --- a/emacs.d/editing.el +++ b/emacs.d/editing.el @@ -17,15 +17,19 @@ (setq-default tab-width 4) (setq-default indent-tabs-mode t) +(setq-default tab-always-indent t) (use-package corfu :ensure t :hook (after-init . global-corfu-mode) - :bind - ( :map corfu-map - ("" . corfu-complete)) + ;; :bind + ;; ( :map corfu-map + ;; ("" . corfu-complete)) :config - (setq tab-always-indent 'complete) + ;;(setq tab-always-indent 'complete) + (setq corfu-auto t) + (setq corfu-auto-delay 0.5) + (setq corfu-auto-prefix 2) (setq corfu-preview-current nil) (setq corfu-min-width 20)) diff --git a/emacs.d/keybinds.el b/emacs.d/keybinds.el index fcd6c74..db5ac74 100644 --- a/emacs.d/keybinds.el +++ b/emacs.d/keybinds.el @@ -39,3 +39,5 @@ (global-set-key (kbd "M-") #'menu-bar-mode) (global-set-key (kbd "C-x C-k") #'kill-this-buffer) + +(global-set-key (kbd "C-SPC") #'completion-at-point)