Skip to content

Commit 380cc39

Browse files
Eskibearfbricon
authored andcommitted
documenting for semantic highlighting
Signed-off-by: Yan Zhang <yanzh@microsoft.com>
1 parent 8713449 commit 380cc39

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,25 @@ New in 0.60.0:
160160
* `java.sources.organizeImports.staticStarThreshold`: Specifies the number of static imports added before a star-import declaration is used, default is 99.
161161
* `java.semanticHighlighting.enabled`: Enable/disable the [semantic highlighting](https://github.com/microsoft/vscode/wiki/Semantic-Highlighting-Overview). Defaults to `true`.
162162

163+
Semantic Highlighting
164+
===============
165+
[Semantic Highlighting](https://code.visualstudio.com/updates/v1_43#_typescript-semantic-highlighting) is a new feature enabled since VS Code 1.43. Color themes can now write [rules](https://code.visualstudio.com/updates/v1_44#_theme-support-for-semantic-tokens) to color semantic tokens reported by this extension. If current color theme does not provide any, you can define your own rules in user settings, e.g.
166+
```json
167+
"editor.tokenColorCustomizationsExperimental": {
168+
"variable":{
169+
"foreground": "#9CDCFE" // change color for tokens of type 'variable'
170+
},
171+
"*.static":{
172+
"fontStyle": "italic" // all tokens with modifier 'static' should be of italic style
173+
},
174+
"*.final":{
175+
"fontStyle": "bold" // all tokens with modifier 'final' should be of bold style
176+
}
177+
}
178+
```
179+
180+
More details in [Semantic Highlighting Wiki Page (Token Styling)](https://github.com/microsoft/vscode/wiki/Semantic-Highlighting-Overview#token-styling).
181+
163182
Troubleshooting
164183
===============
165184
1. Check the status of the language tools on the lower right corner (marked with A on image below).

0 commit comments

Comments
 (0)