microsoft / microsoft/language-server-protocol

Add token/symbol for inactive code

Open
#1,938 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request semantic tokens
Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

Currently, extensions have an odd way of dimming or coloring inactive code. They add non-standard a CSS class and the class dims the code. The opacity and colors are configured in the extension settings instead of in the standard place for colors in VS Code: tokenColorCustomizations: textMateRules.

// Here's what this may look like in VS Code if the user wants to configure it.
"editor.tokenColorCustomizations": {
	"textMateRules": [
		{
			"scope": "inactive",
			"settings": {
				"opacity": 0.5
			}
		}
	]
},

Here are some example of how this works already.

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 comparing the inactive-code handling in the linked vscode.typescript-language-features and ms-vscode.cpptools examples. Then identify the language-server-protocol location where a token or symbol for inactive code would belong; done means extensions can represent inactive code through the standard tokenColorCustomizations textMateRules configuration.

Written by the indexing model from the issue text.

Assessment

Domain
developer-experience, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.