Skip to content

Commit 93f21ac

Browse files
bors[bot]Veetaha
andauthored
Merge #3815
3815: vscode: add support for light themes in "Show Syntax Tree" command r=matklad a=Veetaha Fixes: #3810 Co-authored-by: veetaha <[email protected]>
2 parents f696df3 + f4f7938 commit 93f21ac

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

editors/code/package.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,15 @@
450450
"light": "#747474",
451451
"highContrast": "#BEBEBE"
452452
}
453+
},
454+
{
455+
"id": "rust_analyzer.syntaxTreeBorder",
456+
"description": "Color of the border displayed in the Rust source code for the selected syntax node (see \"Show Syntax Tree\" command)",
457+
"defaults": {
458+
"dark": "#ffffff",
459+
"light": "#b700ff",
460+
"highContrast": "#b700ff"
461+
}
453462
}
454463
],
455464
"semanticTokenTypes": [

editors/code/src/commands/syntax_tree.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,10 @@ class TextDocumentContentProvider implements vscode.TextDocumentContentProvider
8181
// https://code.visualstudio.com/api/extension-guides/tree-view
8282
class AstInspector implements vscode.HoverProvider, Disposable {
8383
private static readonly astDecorationType = vscode.window.createTextEditorDecorationType({
84-
fontStyle: "normal",
85-
border: "#ffffff 1px solid",
84+
borderColor: new vscode.ThemeColor('rust_analyzer.syntaxTreeBorder'),
85+
borderStyle: "solid",
86+
borderWidth: "2px",
87+
8688
});
8789
private rustEditor: undefined | RustEditor;
8890

0 commit comments

Comments
 (0)