Please add native support for Color Identifiers
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
There's an excellent extension that implements this functionality:
https://marketplace.visualstudio.com/items?itemName=MatthewNespor.vscode-color-identifiers-mode&ssr=false
this is one of *very* few extensions i use,
and it would be great if such functionality could just be provided natively by the editor.
Functionally, it selects a color for each distinct identifier,
iff identifier's type is configured[^1] to be colored.
For some people, this makes it easier to "see" the code.
Comparison: Extension:
Current (w/o Extension):
There's potential to do even smarter coloring:
just because two identifiers are identical,
does not mean they are the same, consider:
```
fn a_name() {}
fn test() -> i32 {
a_name();
let a_name = 0;
a_name
}
```
Function `a_name` and function call `a_name()` should have the same color,
but the variable `a_name` is not and "should" have it's own distinct color.
Not sure if [^1] is enough for this, though.
[^1]: https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#standard-token-types-and-modifiers
Contributor guide
Assessment
This issue has not been assessed yet.