roxma / nvim-completion-manager

:warning: PLEASE USE https://github.com/ncm2/ncm2 INSTEAD
MIT License
917 stars 49 forks source link

New fuzzy matcher algorithm #80

Closed sassanh closed 7 years ago

sassanh commented 7 years ago

I brought it from here: https://github.com/sergei-dyshel/vim-abbrev-matcher I think it's just much more intuitive. It should be faster too.

roxma commented 7 years ago

I think it's just much more intuitive.

Agreed.

It should be faster too

I don't think so. subprocess.Popen (spawning a new process) has huge overhead compared to processing in current process. And most of the cases the the amount of completion items is relative small.

In this case, I think it's better to create another matcher (abbrev_matcher.py) instead of overriding fuzzy_matcher.py.

sassanh commented 7 years ago

In this case, I think it's better to create another matcher (abbrev_matcher.py) instead of overriding fuzzy_matcher.py.

sure

sassanh commented 7 years ago

@roxma I did so. By faster I meant faster for large lists.

roxma commented 7 years ago

I've use cherry-pick to merge only the last commit of the PR.

Closing.

jsfaint commented 7 years ago

It's weird. the new fuzzy matcher work not for me on both windows and linux with this setting

let g:cm_matcher = {'module': 'cm_matchers.abbrev_matcher'}
roxma commented 7 years ago

@jsfaint I forgot to mention that this module requires the silver searcher, ag binary.

roxma commented 7 years ago

I would love to see someone convert it to pure python (for performance, and fewer dependencies). I'm not sure how much work is required to accomplish this.

jsfaint commented 7 years ago

Maybe we can use this as reference https://github.com/FelikZ/ctrlp-py-matcher ?