atom / autocomplete-plus

View and insert possible completions in the editor while typing
MIT License
960 stars 263 forks source link

Autocompletion result ranking #767

Open SirCameron opened 8 years ago

SirCameron commented 8 years ago

Autocomplete ranking of results isn't making sense and is incredibly frustrating (sometimes completely useless).

screen shot 2016-09-04 at 8 59 09 pm screen shot 2016-09-09 at 12 05 11 pm

The shots are PHP... so maybe autocomplete-plus isn't actually working for PHP and I'm posting this issue on the wrong repo. If so, please let me know.

But regardless, for fuzzy search ranking in general, I think it makes sense to rank the results in descending order of the count of UNMATCHED characters.. This way the first result will actually be the one you want and users will not have to look through the list each time they want to "quickly" use the fuzzy autocomplete.

winstliu commented 8 years ago

Do you have the "Use Alternate Scoring" option enabled in the ac+ settings? In addition, what Atom version is this and does it still happen in safe mode (atom --safe)?

SirCameron commented 8 years ago

I have alternative scoring on and I'm not using safe mode. I'm using Atom 1.10.2 (latest).

SirCameron commented 8 years ago

*needs-reproduction? Just use the autocomplete and see :)

winstliu commented 8 years ago

Reproduced. @jeancroy is this an issue with fuzzaldrin-plus or a conflict with the completions in language-php?

jeancroy commented 8 years ago

Most definitely in both case exact match should rank first.

If you use default filtering built in Autocomplete-plus, it does a thing where it output a compromise between original order and my fuzzaldrin-plus ranking. See there

The theory is that autocomplete provider may have external knowledge on what is best (eg type definition, file modified etc). However when initial order is alphabetical or just arbitrary, I have a feeling it's dubbing down fuzzaldrin-plus ranking. Maybe that behavior is mostly useful when classic fuzzaldrin is chosen.

I this this is related to https://github.com/atom/autocomplete-plus/issues/653

tofof commented 7 years ago

+1

pfitzseb commented 7 years ago

Just as an FYI: At atom-latex-completions we worked around this issue by doing initial sorting of results via string-score and giving that to the fuzzy matcher -- seems to be working pretty well.

jdhines commented 7 years ago

I see this issue a lot lately when I'm trying to use my snippets, in that it ranks my completely-typed snippet shortcut below fuzzy-matched results, causing me to have to navigate the list to select what I want. Here's an example in a TypeScrip file:

screen shot 2017-09-15 at 11 44 21 am
jeancroy commented 7 years ago

I think this migth be the design issue where inside a provider results are scored properly, but then provider are stacked with a preference order. (match quality does not work across provider boundaries)

On Fri, Sep 15, 2017, 11:46 orangehat notifications@github.com wrote:

I see this issue a lot lately when I'm trying to use my snippets, in that it ranks my completely-typed snippet shortcut below fuzzy-matched results, causing me to have to navigate the list to select what I want. Here's an example in a TypeScrip file: [image: screen shot 2017-09-15 at 11 44 21 am] https://user-images.githubusercontent.com/2855641/30491472-66828a30-9a0b-11e7-98a2-37f3da4abb4e.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atom/autocomplete-plus/issues/767#issuecomment-329820947, or mute the thread https://github.com/notifications/unsubscribe-auth/AMLCEms5pfAwAQPpotonQwV_mkxHY1ulks5sipu4gaJpZM4J46Z6 .

jeancroy commented 7 years ago

In this case modules may always show before code symbols

On Fri, Sep 15, 2017, 12:36 Jean Christophe Roy jcking@gmail.com wrote:

I think this migth be the design issue where inside a provider results are scored properly, but then provider are stacked with a preference order. (match quality does not work across provider boundaries)

On Fri, Sep 15, 2017, 11:46 orangehat notifications@github.com wrote:

I see this issue a lot lately when I'm trying to use my snippets, in that it ranks my completely-typed snippet shortcut below fuzzy-matched results, causing me to have to navigate the list to select what I want. Here's an example in a TypeScrip file: [image: screen shot 2017-09-15 at 11 44 21 am] https://user-images.githubusercontent.com/2855641/30491472-66828a30-9a0b-11e7-98a2-37f3da4abb4e.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/atom/autocomplete-plus/issues/767#issuecomment-329820947, or mute the thread https://github.com/notifications/unsubscribe-auth/AMLCEms5pfAwAQPpotonQwV_mkxHY1ulks5sipu4gaJpZM4J46Z6 .

dannybloe commented 7 years ago

As a new Atom user (experimenting to see if it can replace WebStorm) the autocomplete in combination with snippets completely drives me nuts up to a point that I'm considering to stop using Atom at all. Tried almost all combination in the settings to no avail. I have a snippet 'cl' that completes to console.log() but almost never autocomplete lists this item first when I type 'cl'. As a user I don't care about providers and internal sorting. I just want absolute matches listed first following by matches beginning exactly with what I typed (and perhaps on top of that snippets first).

The same applies for when I choose Find File from the menu (not sure if this is related to autocomplete but it seems to be a pattern in Atom): when I type the first few characters of the file I want to open, it lists items based on parts of the path on top!! And the file I'm looking for is more often than not, not in sight (have to scroll). Totally insane. Matching against the path? Really??

jaapster commented 7 years ago

Completely agree with OP. Exact matches should be on top, and the list should be ordered lexicographically.

dpwrussell commented 7 years ago

Another example where this makes absolutely no sense is when using atom-ide-ui.

I can't think of a time when I'd want the snippet method ahead of the functions.

screen shot 2017-09-22 at 15 36 32

Edit: And as far as I know, the only way to get past that particular issue is to disable autocomplete-snippets which is a huge sacrifice!

Nxt3 commented 6 years ago

This is still bugged, FYI. No combination of settings fixes this for me.

screen shot 2018-03-22 at 2 00 03 pm
miriyalee commented 6 years ago

image so frustrated, I should try VScode again..

jaapster commented 6 years ago

@miriyalee Yes, it is hard to understand why this is still so broken

SirCameron commented 6 years ago

Honestly gave up on Atom ages ago.

miriyalee commented 6 years ago

Recently, I installed Emmet beta plugin, and it brokes my suggestion priority. When I removed that plugin, problem solved.

But still not much satisfied. image

marker => margin