mirror of
https://github.com/jimeh/.emacs.d.git
synced 2026-02-19 13:46:41 +00:00
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.
30 lines
848 B
EmacsLisp
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
|