aboutsummaryrefslogtreecommitdiff
path: root/bard-emacs-modules/bard-emacs-completion.el
diff options
context:
space:
mode:
authorDaniel <[email protected]>2024-11-15 09:25:04 -0500
committerDaniel <[email protected]>2024-11-15 09:25:04 -0500
commit51bd4342d70c96f150703fff8e280d59709154ed (patch)
tree6d3bb75565430353cc96ef9d8537fb7e6a77e769 /bard-emacs-modules/bard-emacs-completion.el
parent7d199223d7496900092ebcfc44b733f99ff017ff (diff)
cpp completion just works somehow
Diffstat (limited to 'bard-emacs-modules/bard-emacs-completion.el')
-rw-r--r--bard-emacs-modules/bard-emacs-completion.el19
1 files changed, 18 insertions, 1 deletions
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))