Skip to content

ROCKTAKEY/ivy-migemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

https://img.shields.io/github/tag/ROCKTAKEY/ivy-migemo.svg?style=flat-square https://img.shields.io/github/license/ROCKTAKEY/ivy-migemo.svg?style=flat-square https://img.shields.io/github/actions/workflow/status/ROCKTAKEY/ivy-migemo/CI.yml.svg?style=flat-square

https://melpa.org/packages/ivy-migemo-badge.svg

Use migemo on ivy.

How to Use?

;; Toggle migemo and fuzzy by command.
(define-key ivy-minibuffer-map (kbd "M-f") #'ivy-migemo-toggle-fuzzy)
(define-key ivy-minibuffer-map (kbd "M-m") #'ivy-migemo-toggle-migemo)

;; If you want to defaultly use migemo on swiper and counsel-find-file:
(setq ivy-re-builders-alist '((t . ivy--regex-plus)
                              (swiper . ivy-migemo-regex-plus)
                              (counsel-find-file . ivy-migemo-regex-plus))
                              ;(counsel-other-function . ivy-migemo-regex-plus)
                              )
;; Or you prefer fuzzy match like ido:
(setq ivy-re-builders-alist '((t . ivy--regex-fuzzy)
                              (swiper . ivy-migemo-regex-fuzzy)
                              (counsel-find-file . ivy-migemo-regex-fuzzy))
                              ;(counsel-other-function . ivy-migemo-regex-fuzzy)
                              )

Functions

ivy-migemo-toggle-fuzzy

Toggle fuzzy match or not on ivy. Almost same as ivy-toggle-fuzzy, except this function can also be used to toggle between ivy-migemo-regex-fuzzy and ivy-migemo-regex-plus.

ivy-migemo-toggle-migemo

Toggle using migemo or not on ivy.

Handle search-default-mode

When you set search-default-mode a function such as char-fold-to-regexp, swiper might through error or might not work with migemo. Then, You can turn on ivy-migemo-search-default-handling-mode. When this mode is turned on, swiper--re-builder is advised to set search-default-mode nil with ivy-migemo on.

License

This package is licensed by GPLv3. See LICENSE.