auto-complete/auto-complete — pull request #340 by marcsaegesser (2014-07-08 01:49:09+00:00)
Title: Added ac-delete-dups

This is a simple change allows dealing with duplicate candidates like mentioned in #312.

The default behavior of auto-complete remains as it is now but allows for developers to turn off duplicate deletion if they want. If they do this they become responsible for providing a visual way to disambiguate the duplicates (e.g. the summary property).

My use case for this very similar to that presented in #312. My backend delivers me a list of possible method completions and the method names can be duplicated because of overloading. The completion text is the method name and the disambigutation is the method signature in the summary property. I have a custom action that optionally inserts a template for the method arguments after the method name has been inserted by auto-complete.

This simple approach doesn't have any adverse performance effects and doesn't introduce any magical logic for determining duplicates (like matching on all properties or some subset of properties).