Support contextual top-level snippets#4910
Open
crtschin wants to merge 21 commits intohaskell:masterfrom
Open
Conversation
In the pursuit of smarter completions, create context trees that can be used as masks for easier filtering of relevant completions based on the line number.
06595c6 to
4e904c8
Compare
Collaborator
Author
|
So there's this funny thing, if the context ranges are too tight, then when typing it's possible to fall out of the edge of a range as the contexts won't follow invalid parses. This causes a lot of the existing tests to fail, as they put the cursor beyond the range of text. To partially get around this, I don't compare columns when determining whether a context range applies to the current range. This gets it to at pass the existing tests, without me having to manually correct the positions at each one. |
d8ba345 to
ad5fd35
Compare
ad5fd35 to
d9687d2
Compare
9b8705f to
e1100c4
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #4905.
Ended up going a bit in the rabbit hole. This adds top-level snippets and includes a bit better nested behavior in deducing the context of completion.