Open ghost opened 6 years ago
I did not verify, but I think Atom uses regex like this to perform search:
when searching word
, it will search .*w.*o.*r.*d.*
Which is pretty nice when we don't remember exactly the spelling of the word we want, but I agree that sometimes the search is completely dumb.
Typed namespac
, and got:
xml_set_start_namespace_decl_handler
xml_set_end_namespace_decl_handler
namespace
(at last!)I think it's worth making more than one regex:
^pattern.*
.*pattern.*
.*p.*a.*t.*t.*e.*r.*n.*
and display results in this order (it means duplicates have to be removed)
But I think it's an Atom issue rather than a package issue, except if the package can perform search its own way.
After a little search, the package responsible for calculating suggestions in Atom is FuzzAldrin
Autocomplete should either suggest elements which are applicable in current context or should prioritize them.
For examaple:
When you type "sta" it suggest setAttribute!! And static is at 8th number. Is it possible to understand that context is class and only limited things can be defined here (variable/method/comment) so that static comes at top.
Another example is:
While typing "pri" private is at 8th number.
This improvement will help in speeding up selecting the right element from suggestions. Currently either you have to use the mouse or type more characters to highlight the correct element.