You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(use-package corfu
:disabledt;; Optional customizations:custom
(corfu-cycle t) ;; Enable cycling for `corfu-next/previous'
(corfu-auto t) ;; Enable auto completion
(corfu-separator ?\s) ;; Orderless field separator
(corfu-quit-at-boundary nil) ;; Never quit at completion boundary:bind (:map corfu-map
("C-n". corfu-next)
("C-p". corfu-previous))
:init
(global-corfu-mode))
;; Add extensions
(use-package cape
:disabledt:custom
(cape-line-buffer-function #'current-buffer)
;; Bind dedicated completion commands;; Alternative prefix keys: C-c p, M-p, M-+, ...:bind (("C-c e p". completion-at-point) ;; capf
("C-c e t". complete-tag) ;; etags
("C-c e d". cape-dabbrev) ;; or dabbrev-completion
("C-c e h". cape-history)
("C-c e f". cape-file)
("C-c e k". cape-keyword)
("C-c e s". cape-symbol)
("C-c e a". cape-abbrev)
("C-c e i". cape-ispell)
("C-c e l". cape-line)
("C-c e w". cape-dict)
("C-c e \\". cape-tex)
("C-c e _". cape-tex)
("C-c e ^". cape-tex)
("C-c e &". cape-sgml)
("C-c e r". cape-rfc1345))
:init;; Add `completion-at-point-functions', used by `completion-at-point'.
(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-history)
(add-to-list'completion-at-point-functions#'cape-keyword)
(add-to-list'completion-at-point-functions#'cape-tex)
(add-to-list'completion-at-point-functions#'cape-sgml)
(add-to-list'completion-at-point-functions#'cape-rfc1345)
(add-to-list'completion-at-point-functions#'cape-abbrev)
;; (add-to-list 'completion-at-point-functions #'cape-ispell);; (add-to-list 'completion-at-point-functions #'cape-dict);; (add-to-list 'completion-at-point-functions #'cape-symbol);; (add-to-list 'completion-at-point-functions #'cape-line)
)
(use-package kind-icon
:ensuret:custom
(kind-icon-default-face 'corfu-default) ; to compute blended backgrounds correctly:config
(add-to-list'corfu-margin-formatters#'kind-icon-margin-formatter))
(use-package company-auctex :defert:after (company) :config (company-auctex-init))
(use-package company-reftex :defert:after (company reftex)
:config
(add-to-list'company-backends'company-reftex-labels)
(add-to-list'company-backends'company-reftex-citations))
Templates
;; Configure Tempel
(use-package tempel
;; Require trigger prefix before template name when completing.;; :custom;; (tempel-trigger-prefix "<");; :bind (("M-+" . tempel-complete) ;; Alternative tempel-expand;; ("M-*" . tempel-insert)):init;; Setup completion at point
(defuntempel-setup-capf ()
;; Add the Tempel Capf to `completion-at-point-functions'.;; `tempel-expand' only triggers on exact matches. Alternatively use;; `tempel-complete' if you want to see all matches, but then you;; should also configure `tempel-trigger-prefix', such that Tempel;; does not trigger too often when you don't expect it. NOTE: We add;; `tempel-expand' *before* the main programming mode Capf, such;; that it will be tried first.
(setq-local completion-at-point-functions
(cons#'tempel-expand
completion-at-point-functions)))
(add-hook'prog-mode-hook'tempel-setup-capf)
(add-hook'text-mode-hook'tempel-setup-capf)
;; Optionally make the Tempel templates available to Abbrev,;; either locally or globally. `expand-abbrev' is bound to C-x '.;; (add-hook 'prog-mode-hook #'tempel-abbrev-mode);; (global-tempel-abbrev-mode)
)