Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Extension/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# C/C++ for Visual Studio Code Change Log

## Version 0.17.7: July 19, 2018
## Version 0.17.8: August 16, 2018
* Add `inactiveRegionForegroundColor` and `inactiveRegionBackgroundColor` to settings. [#2212](https://github.com/Microsoft/vscode-cpptools/issues/2212)

## Version 0.17.7: July 22, 2018
* Fix `Go to Definition` for code scoped with an aliased namespace. [#387](https://github.com/Microsoft/vscode-cpptools/issues/387)
* Fix incorrect IntelliSense errors with template template-arguments. [#1014](https://github.com/Microsoft/vscode-cpptools/issues/1014)
* Fix crash when using designated initializer lists. [#1440](https://github.com/Microsoft/vscode-cpptools/issues/1440)
Expand Down
18 changes: 18 additions & 0 deletions Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,24 @@
"minimum": 0.1,
"maximum": 1
},
"C_Cpp.inactiveRegionForegroundColor": {
"type": [
"string",
"null"
],
"default": null,
"description": "Controls the font coloring of inactive preprocessor blocks. Input is in the form a hexadecimal color code or a valid Theme Color. If not set, this defaults to the syntax coloring scheme of the editor. This setting only applies when inactive region dimming is enabled.",
"scope": "resource"
},
"C_Cpp.inactiveRegionBackgroundColor": {
"type": [
"string",
"null"
],
"default": null,
"description": "Controls the background coloring of inactive preprocessor blocks. Input is in the form a hexadecimal color code or a valid Theme Color. If not set, this defaults to transparent. This setting only applies when inactive region dimming is enabled.",
"scope": "resource"
},
"C_Cpp.formatting": {
"type": "string",
"enum": [
Expand Down
2 changes: 2 additions & 0 deletions Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -840,6 +840,8 @@ class DefaultClient implements Client {

let decoration: vscode.TextEditorDecorationType = vscode.window.createTextEditorDecorationType({
opacity: settings.inactiveRegionOpacity.toString(),
backgroundColor: settings.inactiveRegionBackgroundColor,
color: settings.inactiveRegionForegroundColor,
rangeBehavior: vscode.DecorationRangeBehavior.ClosedOpen
});

Expand Down
2 changes: 2 additions & 0 deletions Extension/src/LanguageServer/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export class CppSettings extends Settings {
public get errorSquiggles(): string { return super.Section.get<string>("errorSquiggles"); }
public get dimInactiveRegions(): boolean { return super.Section.get<boolean>("dimInactiveRegions"); }
public get inactiveRegionOpacity(): number { return super.Section.get<number>("inactiveRegionOpacity"); }
public get inactiveRegionForegroundColor(): string { return super.Section.get<string>("inactiveRegionForegroundColor"); }
public get inactiveRegionBackgroundColor(): string { return super.Section.get<string>("inactiveRegionBackgroundColor"); }
public get autoComplete(): string { return super.Section.get<string>("autocomplete"); }
public get loggingLevel(): string { return super.Section.get<string>("loggingLevel"); }
public get navigationLength(): number { return super.Section.get<number>("navigation.length", 60); }
Expand Down