diff --git a/.config/emacs/init.el b/.config/emacs/init.el index a823bfa..13e1d91 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -88,7 +88,7 @@ (tool-bar-mode -1) (scroll-bar-mode -1) (cua-mode 1) -(set-fringe-mode '(4 . 0)) +(set-fringe-mode '(2 . 0)) ;;; rhjr/packages (use-package magit @@ -147,6 +147,25 @@ (completion-category-defaults nil) ;; Disable defaults, use our settings (completion-pcm-leading-wildcard t)) +(use-package cape + ;; Bind prefix keymap providing all Cape commands under a mnemonic key. + ;; Press C-c p ? to for help. + :bind ("C-c p" . cape-prefix-map) ;; Alternative key: M-, M-p, M-+ + ;; Alternatively bind Cape commands individually. + ;; :bind (("C-c p d" . cape-dabbrev) + ;; ("C-c p h" . cape-history) + ;; ("C-c p f" . cape-file) + ;; ...) + :init + ;; Add to the global default value of `completion-at-point-functions' which is + ;; used by `completion-at-point'. The order of the functions matters, the + ;; first function returning a result wins. Note that the list of buffer-local + ;; completion functions takes precedence over the global list. + (add-hook 'completion-at-point-functions #'cape-abbrev) + (add-hook 'completion-at-point-functions #'cape-dabbrev) + (add-hook 'completion-at-point-functions #'cape-file) +) + (use-package emacs :custom ;; Enable context menu. `vertico-multiform-mode' adds a menu in the minibuffer @@ -163,7 +182,7 @@ '(read-only t cursor-intangible t face minibuffer-prompt)) ;; TAB cycle if there are only few candidates - ;; (completion-cycle-threshold 3) + (completion-cycle-threshold 3) ;; Enable indentation+completion using the TAB key. ;; `completion-at-point' is often bound to M-TAB. @@ -178,7 +197,6 @@ ;; useful beyond Corfu. (read-extended-command-predicate #'command-completion-default-include-p)) -;; Use Dabbrev with Corfu! (use-package dabbrev ;; Swap M-/ and C-M-/ :bind (("M-/" . dabbrev-completion) @@ -208,7 +226,7 @@ ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. - ) + '(package-selected-packages '(cape vertico orderless magit esup corfu consult))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful.