From be42799b084e8fb936eb973dceadf6966dd71cba Mon Sep 17 00:00:00 2001 From: noa@gaiwan.org Date: Wed, 12 Jun 2024 23:18:28 +0000 Subject: Update completion at point configuration --- emacs/init.el | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'emacs/init.el') diff --git a/emacs/init.el b/emacs/init.el index 4c8ec2a..db6d576 100644 --- a/emacs/init.el +++ b/emacs/init.el @@ -14,7 +14,6 @@ (setopt user-mail-address "noa@gaiwan.org") ;; properly distinguish these chords from their ascii legacy -(define-key input-decode-map [?\C-i] [C-i]) (define-key input-decode-map [?\C-m] [C-m]) (use-package tubthumping-theme @@ -169,8 +168,6 @@ and when JID is not in `jabber-activity-banned'." ([remap switch-to-buffer] . consult-buffer) ([remap yank-pop] . consult-yank-pop) ([remap goto-line] . consult-goto-line)) - :custom - (completion-in-region-function 'consult-completion-in-region) ) (use-package marginalia @@ -181,10 +178,14 @@ and when JID is not in `jabber-activity-banned'." (marginalia-max-relative-age most-positive-fixnum) (marginalia-align 'right)) - +;; My keyboard has a tab key and an i key. For legacy reasons, by default emacs converts C-i to mean the same thing as the tab key, but i don't really want that. +;; The tab key is called and it gets translated to TAB. C-i is TAB, but i'd rather it by C-i. That's what this decode line does. +(define-key input-decode-map [?\C-i] [C-i]) +;; Now that tab and C-i are properly distinguished, i can bind C-i to completion at point. (global-set-key (kbd "") 'completion-at-point) +;; I also want to make the completion at point function a bit more friendly than the default, so i ask consult to provide the completion functionality. +(setopt completion-in-region-function 'consult-completion-in-region) -: ;; (use-package org-contacts ;; :ensure t ;; :pin gnu @@ -666,7 +667,7 @@ and when JID is not in `jabber-activity-banned'." ) ;; We are on a unix system, so it makes sense to end files in the unix system way. I'm surprised this isn't the default. -(setopt require-final-newline t +(setopt require-final-newline t) (setopt window-min-height 1 -- cgit 1.4.1-2-gfad0