microsoft / microsoft/language-server-protocol

Should editor consider code actions that are not listed in `codeActionKinds`?

Open
#1,629 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Server can specify code actions that it supports through the codeActionProvider.codeActionKinds server capability. The spec says this about it:

	/**
	 * CodeActionKinds that this server may return.
	 *
	 * The list of kinds may be generic, such as `CodeActionKind.Refactor`,
	 * or the server may list out every specific kind they provide.
	 */
	codeActionKinds?: CodeActionKind[];

My questions are:

  • Should editor only allow code actions specified in codeActionProvider.codeActionKinds to be run as part of the "code actions on save" functionality? I know that "Code actions on save" are not really part of the spec but maybe you have opinion as someone who works with the "reference implementation" (VSCode).
  • Besides "code actions on save", what was the thinking behind introducing this capability? What practical effect should it have on the client from the LSP perspective?

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

Start by reviewing the codeActionProvider.codeActionKinds capability definition and the issue's questions about code actions on save. Compare the stated capability wording with the relevant LSP behavior and record a clear decision or clarification for clients; the issue is done when the expected client effect is documented.

Written by the indexing model from the issue text.

Assessment

Domain
api
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.