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: generate the import declaration for the completion item code ac… #2031
base: main
Are you sure you want to change the base?
feat: generate the import declaration for the completion item code ac… #2031
Conversation
d057ecd
to
be1a229
Compare
Blocked by PR |
…tions In the completion item, the `additionalTextEdits` can only be included the changes about the current file, the other changes should be inserted by the vscode command. For example, when the user selects a component in an HTML file, the extension inserts the selector in the HTML file and auto-generates the import declaration in the TS file.
be1a229
to
6950674
Compare
@ivanwonder Looks like the CI is failing, due to the new test:
|
'range': {'start': {'line': 11, 'character': 11}, 'end': {'line': 15, 'character': 1}} | ||
}]); | ||
}); | ||
}); |
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.
Hi,
Does this support adding auto-imports for default exported components?
Adding a test for that would also be great.
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 PR just reuses the work of code action, with no bug fix. I will put it on my to-do list and look into it.
The two new tests depend on the code of the language service PR. I remember there was a snapshot version for every PR before. I want to update the |
…tions
In the completion item, the
additionalTextEdits
can only be included the changes about the current file, the other changes should be inserted by the vscode command.For example, when the user selects a component in an HTML file, the extension inserts the selector in the HTML file and auto-generates the import declaration in the TS file.