PythonNut / company-flx

:city_sunset: Flx fuzzy matching for company
GNU General Public License v3.0
85 stars 6 forks source link

Questions #13

Closed geraldus closed 7 years ago

geraldus commented 8 years ago

Hi @PythonNut!

Finally I've decided to give a try to your package. I've briefly read discussion you mentioned on company-mode issue tracker. I've installed company-flx but can't understand how it works.

For example, if I type dt it shows me data and default among candidates, which is ok. However, it looks like it behaves wrong for camel case candidates. For example I expect to see mkYesodSunData among candidates for my and mY prefixes (and I expect not to bother with exact case using fuzzy match), but this is not the case, I see expected candidate only if I type mkY. Maybe this package is a bit outdated and unmaintained for now?

PythonNut commented 8 years ago

@geraldus this may be a bug. However, I can't reproduce it. Could you give me some detail steps to reproduce the problem in emacs -Q?

geraldus commented 8 years ago

Sorry for delay! I need some time to provide good example, usually I edit haskell code, so most identifiers are camel-cased. I tried to test company-flx in scratch buffer, but elisp have no camel cased names, so it's hard to reproduce the issue.

I run emacs -Q, then package-initialize, global-company-mode, company-flx-mode.

Then I tried text-mode though, note I set company-dabbrev-downcase to nil, because usually I have camel-case names.

I inserted

testMe
tryMe
testAnotherOne
testRun
testme

Then if I type tr I suppose to see testRun among candidates; for tm I expect to see testMe, tryMe, and testme, but all the time I have candidates which have exactly matching prefix only (it looks like that fuzzy matching do not work at all; with full config and haskell source however it is works, but I didn't test it much because you asked minimal config and it definitely do not give me camel-cased candidates).

I will try to find some more time and provide better example.

PythonNut commented 8 years ago

@geraldus hey, so sorry for forgetting about this. I think the problem is that company-flx does not support company-dabbrev (that would be #11). That's why you're only getting prefixes for candidates that are in the current buffer.

I've been working on this, but I don't have a solution that performs well enough, I'm afraid. We'll see how it goes.