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
fix(language-service): Use ts.CompletionEntry for completions #32375
Conversation
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.
For Enum, the declaration itself should be CamelCase
whereas the enum values should be CONSTANT_CASE
.
This is a prerequisite to fix a bug in template completions whereby completion of the string `ti` for the variable `title` results in `tititle`. This is because the position where the completion is requested is used to insert the completion text. This is incorrect. Instead, a `replacementSpan` should be used to indicate the span of text that needs to be replaced. Angular's own `Completion` interface is insufficient to hold this information. Instead, we should just use ts.CompletionEntry. Also added string enum for `CompletionKind`, which is similar to ts.ScriptElementKind but contains more info about HTML entities.
…r#32375) This is a prerequisite to fix a bug in template completions whereby completion of the string `ti` for the variable `title` results in `tititle`. This is because the position where the completion is requested is used to insert the completion text. This is incorrect. Instead, a `replacementSpan` should be used to indicate the span of text that needs to be replaced. Angular's own `Completion` interface is insufficient to hold this information. Instead, we should just use ts.CompletionEntry. Also added string enum for `CompletionKind`, which is similar to ts.ScriptElementKind but contains more info about HTML entities. PR Close angular#32375
…r#32375) This is a prerequisite to fix a bug in template completions whereby completion of the string `ti` for the variable `title` results in `tititle`. This is because the position where the completion is requested is used to insert the completion text. This is incorrect. Instead, a `replacementSpan` should be used to indicate the span of text that needs to be replaced. Angular's own `Completion` interface is insufficient to hold this information. Instead, we should just use ts.CompletionEntry. Also added string enum for `CompletionKind`, which is similar to ts.ScriptElementKind but contains more info about HTML entities. PR Close angular#32375
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This is a prerequisite to fix a bug in template completions whereby
completion of the string
ti
for the variabletitle
results intititle
.This is because the position where the completion is requested is used
to insert the completion text. This is incorrect. Instead, a
replacementSpan
should be used to indicate the span of text that needsto be replaced. Angular's own
Completion
interface is insufficient tohold this information. Instead, we should just use ts.CompletionEntry.
Also added string enum for
CompletionKind
, which is similar tots.ScriptElementKind but contains more info about HTML entities.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information