Files
vscode-extension-samples/semantic-tokens-sample
Matt Bierner 2ee6b0b7b9 Update all of our samples to target VSCode 1.100 or newer
This makes sure that if folks get a relatively recent `vscode.d.ts`. It also lets us safely bump up the target to es2024 so you can use all the latest lib additions
2025-08-07 07:57:14 -07:00
..
2020-05-29 14:20:07 -07:00
2024-10-28 16:41:49 -07:00
2019-12-09 15:39:21 +01:00
2019-12-09 15:39:21 +01:00
2020-05-01 17:16:40 +02:00
2024-11-26 22:59:45 -08:00
2021-07-10 12:02:11 +07:00

Semantic tokens sample

This is an extension sample showing a very simple semantic tokens provider. This semantic tokens provider always returns all the tokens in a file.

For more background on semantic highlighting read here

Screenshot

How to run

Launch the extension and open the file sample/sample.semanticLanguage and use the following settings:

"editor.semanticTokenColorCustomizations": {
	"enabled": true, // enable for all themes
	"rules": {
		"*.static": {
			"foreground": "#ff0000",
			"fontStyle": "bold"
		},
		"type": {
			"foreground": "#00aa00"
		}
	}
}