Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add settings for auto pch #3184

Merged
merged 9 commits into from
Feb 25, 2019
13 changes: 13 additions & 0 deletions Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,19 @@
"description": "Determines whether pop up notifications will be shown when a configuration provider extension is unable to provide a configuration for a source file.",
"scope": "resource"
},
"C_Cpp.intelliSenseCachePath": {
"type": "string",
"default": "${workspaceFolder}/.vscode/",
"description": "Defines the folder path for cached precompiled headers used by IntelliSense. The default path \"${workspaceFolder}/.vscode/\" will be used if a specified path is invalid.",
"scope": "resource"
},
"C_Cpp.intelliSenseCacheSize": {
"type": "number",
"default": 5120,
"description": "Maximum size of the per-workspace hard drive space in megabytes for cached precompiled headers; the actual usage may fluctuate around this value. The default size is 5120 MB. Precompiled header caching is disabled when the size is 0.",
"scope": "resource",
"minimum": 0
michelleangela marked this conversation as resolved.
Show resolved Hide resolved
},
"C_Cpp.default.includePath": {
"type": [
"array",
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 @@ -402,6 +402,8 @@ class DefaultClient implements Client {
tab_size: other.editorTabSize,
intelliSenseEngine: settings.intelliSenseEngine,
intelliSenseEngineFallback: settings.intelliSenseEngineFallback,
intelliSenseCachePath : settings.intelliSenseCachePath,
intelliSenseCacheSize : settings.intelliSenseCacheSize,
autocomplete: settings.autoComplete,
errorSquiggles: settings.errorSquiggles,
dimInactiveRegions: settings.dimInactiveRegions,
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 @@ -39,6 +39,8 @@ export class CppSettings extends Settings {
public get suggestSnippets(): boolean { return super.Section.get<boolean>("suggestSnippets"); }
public get intelliSenseEngine(): string { return super.Section.get<string>("intelliSenseEngine"); }
public get intelliSenseEngineFallback(): string { return super.Section.get<string>("intelliSenseEngineFallback"); }
public get intelliSenseCachePath(): string { return super.Section.get<string>("intelliSenseCachePath"); }
public get intelliSenseCacheSize(): number { return super.Section.get<number>("intelliSenseCacheSize"); }
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"); }
Expand Down
2 changes: 1 addition & 1 deletion Extension/src/LanguageServer/settingsTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export class SettingsTracker {
break;
}
default: {
if (key === "clang_format_path" || key.startsWith("default.")) {
if (key === "clang_format_path" || key === "intelliSenseCachePath" || key.startsWith("default.")) {
value = this.areEqual(val, settings.inspect(key).defaultValue) ? "<default>" : "..."; // Track whether it's being used, but nothing specific about it.
} else {
value = String(this.previousCppSettings[key]);
Expand Down