mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-13 22:06:56 +00:00
Config to switch to semantic tokens
This commit is contained in:
parent
8c0d0894b6
commit
225ef6dea2
4 changed files with 15 additions and 3 deletions
|
@ -22,6 +22,7 @@ export class Config {
|
|||
private static readonly requiresReloadOpts = [
|
||||
"cargoFeatures",
|
||||
"cargo-watch",
|
||||
"highlighting.semanticTokens"
|
||||
]
|
||||
.map(opt => `${Config.rootSection}.${opt}`);
|
||||
|
||||
|
@ -143,6 +144,7 @@ export class Config {
|
|||
// We don't do runtime config validation here for simplicity. More on stackoverflow:
|
||||
// https://stackoverflow.com/questions/60135780/what-is-the-best-way-to-type-check-the-configuration-for-vscode-extension
|
||||
|
||||
get highlightingSemanticTokens() { return this.cfg.get("highlighting.semanticTokens") as boolean; }
|
||||
get highlightingOn() { return this.cfg.get("highlightingOn") as boolean; }
|
||||
get rainbowHighlightingOn() { return this.cfg.get("rainbowHighlightingOn") as boolean; }
|
||||
get lruCapacity() { return this.cfg.get("lruCapacity") as null | number; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue