From f4f79383b1a4f18022f960102dc83f5199014a9c Mon Sep 17 00:00:00 2001 From: veetaha Date: Thu, 2 Apr 2020 01:20:08 +0300 Subject: vscode: add support for light themes and color customization for syntax tree highlights --- editors/code/package.json | 9 +++++++++ editors/code/src/commands/syntax_tree.ts | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) (limited to 'editors') 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 @@ "light": "#747474", "highContrast": "#BEBEBE" } + }, + { + "id": "rust_analyzer.syntaxTreeBorder", + "description": "Color of the border displayed in the Rust source code for the selected syntax node (see \"Show Syntax Tree\" command)", + "defaults": { + "dark": "#ffffff", + "light": "#b700ff", + "highContrast": "#b700ff" + } } ], "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 // https://code.visualstudio.com/api/extension-guides/tree-view class AstInspector implements vscode.HoverProvider, Disposable { private static readonly astDecorationType = vscode.window.createTextEditorDecorationType({ - fontStyle: "normal", - border: "#ffffff 1px solid", + borderColor: new vscode.ThemeColor('rust_analyzer.syntaxTreeBorder'), + borderStyle: "solid", + borderWidth: "2px", + }); private rustEditor: undefined | RustEditor; -- cgit v1.2.3