fixed lsp, orderless, corfu
irrelevant elements are now correctly filtered out of lsp by orderless,corfu. fixed some whitespace, indentation
This commit is contained in:
@@ -1,60 +1,69 @@
|
||||
;;; completion-packages.el --- Completion stack configuration -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package corfu
|
||||
:config
|
||||
(global-corfu-mode)
|
||||
(corfu-popupinfo-mode)
|
||||
(setq corfu-quit-at-boundary 'seperator
|
||||
corfu-quit-no-match 'seperator)
|
||||
:custom
|
||||
(corfu-auto t)
|
||||
(corfu-auto-delay 0.2)
|
||||
(corfu-auto-prefix 2)
|
||||
(corfu-popupinfo-delay '(0.5 . 0.3)))
|
||||
:config
|
||||
(global-corfu-mode)
|
||||
(corfu-popupinfo-mode)
|
||||
(setq corfu-quit-at-boundary 'separator
|
||||
corfu-quit-no-match 'separator)
|
||||
:custom
|
||||
(corfu-auto t)
|
||||
(corfu-auto-delay 0.1)
|
||||
(corfu-auto-prefix 1)
|
||||
(corfu-popupinfo-delay '(0.5 . 0.3)))
|
||||
|
||||
(use-package vertico
|
||||
:init
|
||||
(vertico-mode)
|
||||
:config
|
||||
(vertico-multiform-mode t)
|
||||
:init
|
||||
(vertico-mode)
|
||||
:config
|
||||
(vertico-multiform-mode t)
|
||||
|
||||
(setq vertico-multiform-commands
|
||||
'(
|
||||
(consult-imenu posframe indexed)
|
||||
(consult-completion-in-region grid)))
|
||||
)
|
||||
(setq vertico-multiform-commands
|
||||
'(
|
||||
(consult-imenu posframe indexed)
|
||||
(consult-completion-in-region grid)))
|
||||
)
|
||||
|
||||
(use-package vertico-posframe
|
||||
:after vertico
|
||||
:config
|
||||
(vertico-posframe-mode t)
|
||||
:after vertico
|
||||
:config
|
||||
(vertico-posframe-mode t)
|
||||
|
||||
(setq vertico-posframe-width 150
|
||||
vertico-posframe-min-width 90
|
||||
vertico-posframe-border-width 3
|
||||
vertico-count 15
|
||||
vertico-scroll-margin 4)
|
||||
)
|
||||
(setq vertico-posframe-width 150
|
||||
vertico-posframe-min-width 90
|
||||
vertico-posframe-border-width 3
|
||||
vertico-count 15
|
||||
vertico-scroll-margin 4)
|
||||
)
|
||||
|
||||
;use consult + vertico instead of corfu if in terminal
|
||||
;use consult + vertico instead of corfu if in terminal
|
||||
(use-package consult
|
||||
:defer t
|
||||
:init
|
||||
(setq completion-in-region-function #'consult-completion-in-region
|
||||
consult-fd-args '("fd" "--color=never" "--hidden" ))
|
||||
:config
|
||||
(add-hook 'after-change-major-mode-hook
|
||||
(lambda ()
|
||||
(setq completion-in-region-function #'consult-completion-in-regionc)))
|
||||
)
|
||||
:defer t
|
||||
:init
|
||||
(setq completion-in-region-function #'consult-completion-in-region
|
||||
consult-fd-args '("fd" "--color=never" "--hidden" ))
|
||||
:config
|
||||
(add-hook 'after-change-major-mode-hook
|
||||
(lambda ()
|
||||
(setq completion-in-region-function #'consult-completion-in-region)))
|
||||
)
|
||||
|
||||
(use-package marginalia
|
||||
:init
|
||||
(marginalia-mode))
|
||||
:init
|
||||
(marginalia-mode))
|
||||
|
||||
(use-package orderless
|
||||
:custom
|
||||
(completion-styles '(orderless basic))
|
||||
(completion-pcm-leading-wildcard t))
|
||||
:custom
|
||||
(completion-styles '(orderless basic))
|
||||
(completion-pcm-leading-wildcard t)
|
||||
(completion-category-defaults nil)
|
||||
(orderless-matching-styles '(orderless-prefixes orderless-literal))
|
||||
|
||||
:config
|
||||
;;necessary to force filtering of lsp-mode candidates
|
||||
(add-to-list 'completion-category-overrides
|
||||
'(lsp-capf (styles orderless)
|
||||
(orderless-matching-styles orderless-prefixes orderless-literal)))
|
||||
)
|
||||
|
||||
(provide 'completion-packages)
|
||||
|
||||
Reference in New Issue
Block a user