From 51bd4342d70c96f150703fff8e280d59709154ed Mon Sep 17 00:00:00 2001 From: Daniel <89086143+BardofSprites@users.noreply.github.com> Date: Fri, 15 Nov 2024 09:25:04 -0500 Subject: cpp completion just works somehow --- bard-emacs-modules/bard-emacs-completion.el | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'bard-emacs-modules/bard-emacs-completion.el') diff --git a/bard-emacs-modules/bard-emacs-completion.el b/bard-emacs-modules/bard-emacs-completion.el index 23177d5..9fa6c21 100644 --- a/bard-emacs-modules/bard-emacs-completion.el +++ b/bard-emacs-modules/bard-emacs-completion.el @@ -71,6 +71,23 @@ (corfu-history-mode 1) (add-to-list 'savehist-additional-variables 'corfu-history))) +(use-package cape + :ensure t + :init + (add-to-list 'completion-at-point-functions #'cape-file) + (add-to-list 'completion-at-point-functions #'cape-dabbrev) + (add-to-list 'completion-at-point-functions #'cape-keyword) + (add-to-list 'completion-at-point-functions #'cape-abbrev)) + +(use-package clang-capf + :ensure t + :config + (defun bard/clang-capf-init () + "Add `clang-capf' to `completion-at-point-functions'." + (add-hook 'completion-at-point-functions #'clang-capf nil t)) + + (add-hook 'c-mode-hook #'bard/clang-capf-init)) + (use-package minibuffer :config ;;;; Completion styles @@ -151,7 +168,7 @@ ;; minimal indicator. It shows cycling, which I never want to see ;; or do. (setq embark-mixed-indicator-both nil) - (setq embark-mixed-indicator-delay 1.0) + (setq embark-mixed-indicator-delay 0.1) (setq embark-indicators '(embark-mixed-indicator embark-highlight-indicator)) (setq embark-verbose-indicator-nested nil) ; I think I don't have them, but I do not want them either (setq embark-verbose-indicator-buffer-sections '(bindings)) -- cgit v1.2.3