-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bracket matching #50
Merged
Merged
Bracket matching #50
Conversation
This file contains 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
…on whitespace format
breedloj
approved these changes
Oct 4, 2024
} | ||
} | ||
break; | ||
case NADA: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This made me chuckle..but maybe NONE
? 😄
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.
Issue #, if available:
https://issues.amazon.com/issues/ECLIPSE-286
Premise
This PR revamps the rendering logic for the suggestion text, using the change in #37 as foundation. It also enables bracket matching during typeahead.
Description of changes:
Apart from the features addition, there are also the following bug fixes:
Test
Closing brackets are being highlighted during typeahead:

Unresolved brackets are added to user buffer upon preview termination:

Disclaimer
There are still some edge cases that we would need to cover in the future with more changes.
Most of these have to do with the differences between how the lsp and the IDE interprets whitespace.
For example, consider the following text:
Currently is it possible that the user may not be able to typeahead across line 3. This is because the suggestion on from line 2 to line 3 may very well be
\n
or\n\t
or\n
or\n\n
.For reference, depending on the IDE's settings, when user types from line 2 to 3, the input as observed by
verifyText
is going to be either\n\t
if they have tabs only enabled or\n ' ' ** $tabSize
if they have space only enabled.I have made an issue to track these: https://issues.amazon.com/issues/ECLIPSE-340
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.