Skip to content

Conversation

zth
Copy link
Member

@zth zth commented Jan 11, 2023

This makes it so that triggering completion on _ (Ppat_any) is considered the same as triggering an empty typed completion. Some(<com>) and Some(_<com>) is now considered the same when triggering completion.

The main reason is that we're inserting _ and putting the cursor on it via snippets. So, being able to trigger completion directly again on _ is quite helpful.

@zth zth requested a review from cristianoc January 11, 2023 18:52
@zth zth mentioned this pull request Jan 11, 2023
24 tasks
match orPatWithItem with
| None when isPatternHole p1 || isPatternHole p2 -> Some ("", patternPath)
| v -> v)
| Ppat_any -> someIfHasCursor ("", patternPath)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps add a quick comment.

@zth zth merged commit 37cd3db into master Jan 12, 2023
@zth zth deleted the let-ppat-any-complete branch January 12, 2023 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants