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

"CodeAction must set either edit and/or command" incomplete? #2023

Open
didrikmunther opened this issue Sep 19, 2024 · 1 comment
Open

"CodeAction must set either edit and/or command" incomplete? #2023

didrikmunther opened this issue Sep 19, 2024 · 1 comment
Milestone

Comments

@didrikmunther
Copy link
Contributor

A CodeAction is the response for at least these two methods:

textDocument/codeAction: (Command | CodeAction)[] | null
codeAction/resolve: CodeAction

The codeAction/resolve specification states:

The request is sent from the client to the server to resolve additional information for a given code action. This is usually used to compute the edit property of a code action to avoid its unnecessary computation during the textDocument/codeAction request.

The CodeAction specification states:

A CodeAction must set either edit and/or a command

It seems that there is missing a part in the above description, clarifying that a CodeAction must set either edit and/or a command IF the method is codeAction/resolve.

@dbaeumer dbaeumer added this to the Next milestone Dec 18, 2024
@dbaeumer
Copy link
Member

The comment on a code action was made before we introduced the resolve request. So a code action can now leave both undefined.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants