Files
.emacs.d/modules/editor/siren-orderless.el
Jim Myhrberg 106245af8b feat(completion): improve completion-at-point/company candidates
This applies especially in lsp-mode. Yasnippet snippets now show as
completion candidates if the word at point exactly matches a snippet
keyword, otherwise it'll fallback to normal lsp backed completion.

And it also supports completing file/directory names now too while
lsp-mode is active.

All this is done by modifying completion-at-point-functions after
lsp-mode has done it's trickery with it. Along with a dirty hack to
company-yasnippet to make it only activate on exact matches. Without
this hack, lsp backed completion rarely activates as snippets would have
higher priority if there's any partial matches.
2022-03-14 21:16:13 +00:00

30 lines
848 B
EmacsLisp

;;; siren-orderless.el --- jimeh's Emacs Siren: orderless configuration.
;;; Commentary:
;; Basic configuration for orderless.
;;; Code:
(use-package orderless
:custom
(completion-styles '(orderless))
(orderless-matching-styles '(orderless-literal
orderless-prefixes
orderless-regexp
orderless-initialism
orderless-flex))
:init
(with-eval-after-load 'selectrum
(setq selectrum-refine-candidates-function #'orderless-filter)
(setq selectrum-highlight-candidates-function #'orderless-highlight-matches))
:config
(setf (alist-get 'styles
(alist-get 'file completion-category-overrides))
'(partial-completion)))
(provide 'siren-orderless)
;;; siren-orderless.el ends here