microsoft / microsoft/language-server-protocol

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

Open
#2,023 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

clarification
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

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.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the linked LSP 3.17 language/codeAction specification, especially the codeAction/resolve passage and the quoted CodeAction requirement. Done means clarifying in the specification whether the edit/command requirement applies to codeAction/resolve while preserving the documented response shapes.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.