-
|
I am new to emacs, and I use lspmode. Whenever I type (in a cpp file) |
Beta Was this translation helpful? Give feedback.
Answered by
minad
Feb 29, 2024
Replies: 2 comments 1 reply
-
(use-package corfu
:ensure t
:custom
(corfu-cycle t)
(corfu-auto t)
(corfu-separator ?\s)
(corfu-quit-at-boundary t)
(corfu-quit-no-match 'separator)
:config
(set-face-attribute 'corfu-default nil :background "#000104")
:hook
((prog-mode . corfu-mode)
(org-mode . corfu-mode)
(shell-mode . corfu-mode)
(eshell-mode . corfu-mode))
:init
(global-corfu-mode)
)
(use-package emacs
:init
(setq completion-cycle-threshold 1)
(setq tab-always-indent 'complete)
)
(setq
corfu-auto t
corfu-auto-delay 0
corfu-auto-prefix 0
completion-styles '(orderless)
)
(use-package corfu
:custom
(corfu-auto t)
(corfu-preselect 'directory)
:bind
(:map corfu-map ("RET" . nil))
:init
(global-corfu-mode)
)
(defun corfu-insert-shell-filter (&optional _)
"Insert completion candidate and send when inside comint/eshell."
(when (or (derived-mode-p 'eshell-mode) (derived-mode-p 'comint-mode))
(lambda ()
(interactive)
(corfu-insert)
(corfu-send-shell)
)
)
)
(setq orderless-component-separator " ")
(setq corfu-auto t
corfu-quit-no-match t
corfu-quit-at-boundary t)
(setq completion-styles '(orderless)
completion-category-defaults nil
orderless-component-separator "")
(add-hook 'minibuffer-setup-hook
(lambda () (setq-local orderless-component-separator " ")))
(use-package nerd-icons-corfu
:config
(add-to-list 'corfu-margin-formatters #'nerd-icons-corfu-formatter)
:ensure t)
Here is my config for corfu related things |
Beta Was this translation helpful? Give feedback.
1 reply
-
|
@minad Thanks :D, works like magic. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, check out the documentation here: https://github.com/minad/corfu/wiki#configuring-corfu-for-lsp-clients