mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
vscode: add support for light themes and color customization for syntax tree highlights
This commit is contained in:
parent
f696df379a
commit
f4f79383b1
2 changed files with 13 additions and 2 deletions
|
@ -450,6 +450,15 @@
|
||||||
"light": "#747474",
|
"light": "#747474",
|
||||||
"highContrast": "#BEBEBE"
|
"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": [
|
"semanticTokenTypes": [
|
||||||
|
|
|
@ -81,8 +81,10 @@ class TextDocumentContentProvider implements vscode.TextDocumentContentProvider
|
||||||
// https://code.visualstudio.com/api/extension-guides/tree-view
|
// https://code.visualstudio.com/api/extension-guides/tree-view
|
||||||
class AstInspector implements vscode.HoverProvider, Disposable {
|
class AstInspector implements vscode.HoverProvider, Disposable {
|
||||||
private static readonly astDecorationType = vscode.window.createTextEditorDecorationType({
|
private static readonly astDecorationType = vscode.window.createTextEditorDecorationType({
|
||||||
fontStyle: "normal",
|
borderColor: new vscode.ThemeColor('rust_analyzer.syntaxTreeBorder'),
|
||||||
border: "#ffffff 1px solid",
|
borderStyle: "solid",
|
||||||
|
borderWidth: "2px",
|
||||||
|
|
||||||
});
|
});
|
||||||
private rustEditor: undefined | RustEditor;
|
private rustEditor: undefined | RustEditor;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue