Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Suggestions should favour exact matches? #998

Open
smth opened this issue Nov 5, 2018 · 2 comments
Open

Suggestions should favour exact matches? #998

smth opened this issue Nov 5, 2018 · 2 comments

Comments

@smth
Copy link

smth commented Nov 5, 2018

Description

I'm not sure if this is a bug or a feature, but recently I've been getting unexpected results. Previously, when typing <div cl the top suggestion would have been class. Now it is col, with class being third in the list. Having typed cl, I'm not expecting the top suggestion to be something that doesn't start with cl.

That aside, if you accept the first suggestion in the above example, you get <div <col span="2">>, which nobody wants.

Steps to Reproduce

  1. Create HTML file
  2. Type <div cl

Expected behaviour: Get a list of suggestions, probably starting with class.

Actual behaviour: Get a list of suggestions, starting with col.

Reproduces how often:
100%

Versions

Atom 1.32.1
autocomplete-plus 2.41.0

Additional Information

Expected behaviour returns when Use Tree Sitter Parsers is disabled.

@rsese
Copy link

rsese commented Nov 5, 2018

Thanks for the report!

I'm unable to reproduce on macOS 10.12.6 with Atom 1.32.1 in safe mode:

1.32.1-autocomplete-cl

I opened a test.html file and then typed <div cl.

If you can reproduce consistently, can you edit the issue body to use the issue template to give us step-by-step instructions to reproduce and a GIF/screencast if you think it would be helpful?

but recently I've been getting unexpected results

Do you remember exactly when you started seeing this behavior? Was it as of 1.32? If so, if you temporarily disable Settings > Core > Enable Tree Sitter Parsers, does that make any difference?

@smth
Copy link
Author

smth commented Nov 9, 2018

Issue description updated.

I don't remember exactly when, but your hunch is probably correct. If I disable Tree Sitter Parsers the behaviour returns to what I would expect. Wondering therefore whether the additional stuff, with any sort of match, that's added with this enabled is just all being put at the top of the list.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants