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

feat(server): support code action #1723

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

ivanwonder
Copy link
Contributor

@ivanwonder ivanwonder commented Jul 9, 2022

In ts service, the
codeFixes(getCodeFixesAtPosition)
and
refactors(getApplicableRefactors)
are resolved in different request. But in LSP they are resolved in the CodeAction request.
Now, this PR only handles the codeFixes because the @angular/language-service only supports it.

@dylhunn
Copy link
Collaborator

dylhunn commented Aug 2, 2022

@ivanwonder Would you be able to rebase this PR? Let me know if it's time for review on this as well. Thanks!

@ivanwonder
Copy link
Contributor Author

@ivanwonder Would you be able to rebase this PR? Let me know if it's time for review on this as well. Thanks!

@dylhunn Done. You can review it now.

Copy link
Collaborator

@atscott atscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with a few nits and requests for additional comments. Great work!

integration/lsp/ivy_spec.ts Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
server/src/session.ts Outdated Show resolved Hide resolved
server/src/session.ts Outdated Show resolved Hide resolved
server/src/session.ts Show resolved Hide resolved
server/src/session.ts Show resolved Hide resolved
@atscott atscott added the target: minor This PR is targeted for the next minor release label Aug 3, 2022
In ts service, the
`codeFixes`([getCodeFixesAtPosition](https://github.com/microsoft/TypeScript/blob/7584e6aad6b21f7334562bfd9d8c3c80aafed064/src/services/services.ts#L2689))
and
refactors([getApplicableRefactors](https://github.com/microsoft/TypeScript/blob/7584e6aad6b21f7334562bfd9d8c3c80aafed064/src/services/services.ts#L2699))
are resolved in different request. But in LSP they are resolved in the `CodeAction` request.
Now, this PR only handles the `codeFixes` because the `@angular/language-service` only supports it.
@atscott atscott added the action: merge Ready to merge label Aug 4, 2022
@atscott atscott merged commit a5ecf2d into angular:main Aug 4, 2022
@ivanwonder ivanwonder deleted the support-codefixes branch August 5, 2022 00:43
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge Ready to merge target: minor This PR is targeted for the next minor release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants