Skip to content
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: replace the closing symbol for inputs/outputs. #2142

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ivanwonder
Copy link
Contributor

The Angular Language Service does not return InsertReplaceEdit. There is no need to allow the developer to choose how to insert the completion.

For example, `<button (c|) />`.
                      ^^__________Insert edit
                      ^^ ^________Replace edit

If the LS returns the InsertReplaceEdit as shown above, selecting "Insert" by the developer results in (click)=""), and selecting "Replace" results in (click)="".

Now in the vscode, the default editor.suggest.insertMode value for HTML is Replace, for ts is Insert, So this leads to a bug in the ts file.

Fixes #2137

The Angular Language Service does not return `InsertReplaceEdit`.
There is no need to allow the developer to choose how to insert the completion.

For example, `<button (c|) />`.
                      ^^__________Insert edit
                      ^^ ^________Replace edit

If the LS returns the `InsertReplaceEdit` as shown above, selecting "Insert" by the developer
results in `(click)="")`, and selecting "Replace" results in `(click)=""`.

Now in the vscode, the default `editor.suggest.insertMode` value for HTML is `Replace`, for
ts is `Insert`, So this leads to a bug in the ts file.

Fixes angular#2137
@ivanwonder
Copy link
Contributor Author

ivanwonder commented Feb 9, 2025

This also reverts the commit.

PTAL @atscott

more info here #2137 (comment)

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.

bug: extra ] gets added on attribute binding completion
1 participant