Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (use-package corfu
- :ensure t
- :straight t
- :config
- (global-corfu-mode)
- (setq
- corfu-auto-prefix 1
- corfu-auto-delay 0
- corfu-cycle t
- corfu-auto t
- corfu-quit-at-boundary t
- corfu-quit-no-match nil
- corfu-preview-current 'insert
- corfu-preselect-first nil
- corfu-on-exact-match 'insert
- corfu-scroll-margin 3))
- (use-package cape
- :ensure t
- :straight t
- :init
- (use-package yasnippet
- :diminish yas-minor-mode
- :config
- ;; Yas messages stretches the status buffer when it starts up.
- (setq yas-verbosity 0)
- (yas-global-mode 1))
- ;; For `company-yasnippet'.
- (use-package company :ensure t :straight t)
- (defvar cape-yasnippet (cape-company-to-capf 'company-yasnippet))
- (defun cape-setup ()
- "Set up `cape'."
- (let* ((has-t (memq 't completion-at-point-functions))
- (copy (delete 't completion-at-point-functions))
- (caps `(,@copy cape-dabbrev cape-keyword ,cape-yasnippet)))
- (when (memq major-mode '(emacs-lisp-mode))
- (setq caps (append caps '(cape-symbol))))
- (when caps
- (setq-local completion-at-point-functions
- `(,(apply 'cape-super-capf caps))))
- (when has-t
- (setq-local completion-at-point-functions
- (append completion-at-point-functions '(t))))))
- (add-hook 'prog-mode-hook 'cape-setup 100)
- (add-hook 'org-mode-hook 'cape-setup 100)
- :config
- (setq cape-dabbrev-min-length 3)
- (cape-setup))
Advertisement
Add Comment
Please, Sign In to add comment