diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-02 08:25:03 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-02 08:25:03 +0100 |
commit | 93f21ac624815dc58ea367eb4127526564206e84 (patch) | |
tree | 5d469a341e47d59e14988bf36383b02e840facfb /editors/code | |
parent | f696df379a5dd450b3d89a8c690de5f8d78f6be2 (diff) | |
parent | f4f79383b1a4f18022f960102dc83f5199014a9c (diff) |
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]>
Diffstat (limited to 'editors/code')
-rw-r--r-- | editors/code/package.json | 9 | ||||
-rw-r--r-- | editors/code/src/commands/syntax_tree.ts | 6 |
2 files changed, 13 insertions, 2 deletions
diff --git a/editors/code/package.json b/editors/code/package.json index 146b696e9..cf74c6775 100644 --- a/editors/code/package.json +++ b/editors/code/package.json | |||
@@ -450,6 +450,15 @@ | |||
450 | "light": "#747474", | 450 | "light": "#747474", |
451 | "highContrast": "#BEBEBE" | 451 | "highContrast": "#BEBEBE" |
452 | } | 452 | } |
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 | } | ||
453 | } | 462 | } |
454 | ], | 463 | ], |
455 | "semanticTokenTypes": [ | 464 | "semanticTokenTypes": [ |
diff --git a/editors/code/src/commands/syntax_tree.ts b/editors/code/src/commands/syntax_tree.ts index 996c7a716..ad9878617 100644 --- a/editors/code/src/commands/syntax_tree.ts +++ b/editors/code/src/commands/syntax_tree.ts | |||
@@ -81,8 +81,10 @@ class TextDocumentContentProvider implements vscode.TextDocumentContentProvider | |||
81 | // https://code.visualstudio.com/api/extension-guides/tree-view | 81 | // https://code.visualstudio.com/api/extension-guides/tree-view |
82 | class AstInspector implements vscode.HoverProvider, Disposable { | 82 | class AstInspector implements vscode.HoverProvider, Disposable { |
83 | private static readonly astDecorationType = vscode.window.createTextEditorDecorationType({ | 83 | private static readonly astDecorationType = vscode.window.createTextEditorDecorationType({ |
84 | fontStyle: "normal", | 84 | borderColor: new vscode.ThemeColor('rust_analyzer.syntaxTreeBorder'), |
85 | border: "#ffffff 1px solid", | 85 | borderStyle: "solid", |
86 | borderWidth: "2px", | ||
87 | |||
86 | }); | 88 | }); |
87 | private rustEditor: undefined | RustEditor; | 89 | private rustEditor: undefined | RustEditor; |
88 | 90 | ||