Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Introduce service API version 4.0 with simplified prefix handling #940
Description of the Change
Autocomplete providers are passed a prefix string, which describes the characters preceding the cursor.
Previously, in API v3, this prefix was computed based on a regular expression in this package. It would recognize a fixed set of word characters or a sequence of non-word characters. Unfortunately, this clashed with the fact that different languages have different sets of valid word characters.
When @leroix added the subsequence provider in #886, he introduced the ability to complete words containing symbols, such as
In this PR, we revert #930 and restore the original prefix behavior for API version 3. We then introduce API version 4, which changes the prefix computation as follows:
This PR also simplifies our handling of semver. Since we only need to deal with breaking changes, it replaces semver strings with simple integer comparisons.
We could have special-cased the
Yet another API version for completion providers, and we still support version 1.0.