Prioritise keyword autocomplete?

Issue #1778 resolved
Xander Victory created an issue

When writing Apex I’ve noticed that keywords seem to be given less love by the autocomplete sorting (perhaps just by virtue of being alphabetical?)

Would it be possible to give them a higher priority in the sorting?

e.g Intending to type return

Comments (5)

  1. Attila Hajdrik

    I second this, the pascal case matching is a really useful feature so match ‘RT’ to ‘RecordType' as first match but that has to be case sensitive hence the feature, and lowercase ‘ret’ should not prioritize the smarter pascal case matches.

  2. Scott Wells repo owner

    Yeah, I've run into this myself. This actually worked very nicely when Apex code completions weren't case-insensitive, but when I made the change to allow for that--and that was definitely a valuable change--I probably should have added a sorter that prioritizes exact case matches over case-insensitive matches. I'll look into that.

  3. Scott Wells repo owner

    Just committed the following enhancement for completion order/prioritization:

    Completions are now prioritized holistically based on how well they match against the existing prefix string. Case-sensitive starting matches are prioritized highest followed by case-insensitive starting matches and case-sensitive content matches followed by all other completions. Within each group completions are prioritized as originally specified.

    This results in the following behavior:

    Issue_1778.png

    This will be included in the next build.

  4. Log in to comment