Closed leotaku closed 6 years ago
It's not issue in ncm2-syntax, it's a feature of ncm2 matcher. The default matcher is abbrfuzzy
It you set with this
let g:ncm2#matcher = 'prefix'
You will got what you want.
But you are right, the prefix matcher is more intuitive, so I rewrite the matcher of ncm2-syntax. 😄
😢 Oh no, I found that I just re-event the wheel, ncm2 already provides the ncm2#override_source()
API, the only thing you need is add this into your vimrc
call ncm2#override_source('syntax', {'matcher': 'prefix'})
I just removed that stupid commit. 😭
Hmmm..., maybe I am missing something, but this doesn't seem to work for me. I have:
call ncm2#override_source('syntax', {'matcher': 'prefix'})
inside my .vimrc, but still get 'wrong' completion.
The completion source only starts treating letters as the word it is expected to complete when it is past the complete length.
with complete_length=[[1, 3]]
:
so|m
map
mop
meow
with complete_length=[[1, 6]]
:
anyth|i
iter
imap
I am pretty sure this is a bug.
I tried with bash, go and c, and I can't reproduce it anymore. Which language do you use and can you provide the minimal vimrc to reproduce it?
This was fixed by updating to the latest ncm2-syntax version. Because you said you undid your commit addressing this problem it did not occur to me that I had to update. Sorry for wasting your time.
@LeOtaku No, thank you! I tried to fix this issue once before in commit 8007abf3b231ea25889d85bbc831ed6c320926b7, but it look the issue is still there. Thanks for your help 👍 Maybe we can close this issue now?
Yes, by my testing this is fixed now.
This might also be a bug, but when I use ncm2-syntax I sometimes get the following completion:
This to me seems like unwanted behavior, I think it would be more intuitive if ncm2-syntax only tried to complete entire words did not start matching in the middle of them.