Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a draft implementation of configuration for which pairs of tokens get auto completed. It is intended to address #1347 and at least put into place the machinery for #992.
In order to help with this, the logic for when not to auto complete has been generalized to compute an arbitrary predicate for any given pairing. This gets rid of necessarily hard coding which tokens should allow a pairing, although it
still keeps this behavior as a default. The intention is to allow future flexibility with controlling the conditions for when any particular pairing should or should not happen, e.g. only if immediately following a word character, not when inside a certain tree-sitter node, etc. This will help with cases like avoiding pairing ' in Rust's lifetime
annotations, and allowing pairing <> after type names, but not in a "less than" expression.
I am opening a draft first to see if you agree with the general approach here before moving on to docs, and perhaps some of the aforementioned pairing conditions.