Skip to content

Commit

Permalink
pinyinlib: Support pinyin in vertico and consult
Browse files Browse the repository at this point in the history
  • Loading branch information
Eason0210 committed Nov 4, 2023
1 parent b2728e4 commit 09621f5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions init.el
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,14 @@
(eglot (styles orderless))))
(orderless-component-separator #'orderless-escapable-split-on-space))

(use-package pinyinlib
:after orderless
:autoload pinyinlib-build-regexp-string
:init
(defun completion--regex-pinyin (str)
(orderless-regexp (pinyinlib-build-regexp-string str)))
(add-to-list 'orderless-matching-styles 'completion--regex-pinyin))

(use-package vertico
:demand t
:bind (:map vertico-map
Expand Down

0 comments on commit 09621f5

Please sign in to comment.