microsoft / microsoft/language-server-protocol

Add more description to Diagnostic[] in CodeActionContext specification

Open
#583 17 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Hi!

I was looking into documentation for this request https://microsoft.github.io/language-server-protocol/specification#textDocument_codeAction and it is not really clear what should be inside the Diagnostic[] array in CodeActionContext. Which diagnostics should the client send? How detailed should be this diagnostics (like which fields does the server actually need)? What will happen if the client simply sends an empty array?

I've looked into https://github.com/Microsoft/TypeScript and if I'm not mistaken only errorCode is used there from the whole diagnostic (please correct me if I'm wrong), so sending all of it seems like too much.

Anyway, it would be really great if you could add more context to this part of specification.

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 textDocument/codeAction section of the LSP specification and compare the Diagnostic[] usage in Microsoft/TypeScript, both linked in the issue. Clarify which diagnostics and fields clients should send, including the meaning of an empty array; the work is done when the specification answers these questions explicitly.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.