Suggestions should favour exact matches?
Opened this issue · 2 comments
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
- Create HTML file
- 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.
Thanks for the report!
I'm unable to reproduce on macOS 10.12.6 with Atom 1.32.1 in safe mode:
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?
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.