-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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
feat(language-service): autocompletion for the component not imported #55595
base: main
Are you sure you want to change the base?
feat(language-service): autocompletion for the component not imported #55595
Conversation
5a9b8ca
to
fa81eca
Compare
This will be a bug if two components have the same selector name. I think we can fix this later. |
fa81eca
to
b3feb56
Compare
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.
Really nice work, thank you for making this improvement! I didn't realize you could provide actions alongside completions like this, and good work factoring out the common code.
reviewed-for: fw-compiler, language-service
I find a bug here. I only tested it in the HTML file, It doesn't work for the template in the ts file because the code action breaks the rule of I think the code action for auto-import should only touch the imports array instead of the whole component decorators. I will try to fix this. Sorry about this. |
1db1e64
to
406fc96
Compare
This PR allows the language service to suggest imports for all directives returned from the compiler, and generate the TypeScript module import and the decorator import when the component is selected by the user.
406fc96
to
9521fc5
Compare
This PR allows the language service to suggest imports for all directives returned from the compiler, and generate the TypeScript module import and the decorator import when the component is selected by the user.
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