From ed157007347f9c28a3a8136eeaa7849ee86e709a Mon Sep 17 00:00:00 2001 From: Michelle Matias <38734287+michelleangela@users.noreply.github.com> Date: Tue, 7 Jul 2020 15:04:28 -0700 Subject: [PATCH] Add settings to optionally simplify structured comments (Doxygen) (#5730) --- Extension/package.json | 6 ++++++ Extension/package.nls.json | 1 + Extension/src/LanguageServer/client.ts | 1 + Extension/src/LanguageServer/settings.ts | 1 + Extension/src/nativeStrings.json | 3 ++- 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Extension/package.json b/Extension/package.json index f69f9662b8..ba882413d9 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -250,6 +250,12 @@ "description": "%c_cpp.configuration.preferredPathSeparator.description%", "scope": "machine-overridable" }, + "C_Cpp.simplifyStructuredComments": { + "type": "boolean", + "default": true, + "description": "%c_cpp.configuration.simplifyStructuredComments.description%", + "scope": "application" + }, "C_Cpp.commentContinuationPatterns": { "type": "array", "default": [ diff --git a/Extension/package.nls.json b/Extension/package.nls.json index 0da8b71240..8e9709ec97 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -36,6 +36,7 @@ "c_cpp.configuration.workspaceSymbols.description": "The symbols to include in the query results when 'Go to Symbol in Workspace' is invoked", "c_cpp.configuration.exclusionPolicy.description": "Instructs the extension when to use the \"files.exclude\" setting when determining which files should be added to the code navigation database while traversing through the paths in the \"browse.path\" array. \"checkFolders\" means that the exclusion filters will only be evaluated once per folder (individual files are not checked). \"checkFilesAndFolders\" means that the exclusion filters will be evaluated against every file and folder encountered. If your \"files.exclude\" setting only contains folders, then \"checkFolders\" is the best choice and will increase the speed at which the extension can initialize the code navigation database.", "c_cpp.configuration.preferredPathSeparator.description": "The character used as a path separator for #include auto-completion results.", + "c_cpp.configuration.simplifyStructuredComments.description": "If true, tooltips of hover and auto-complete will only display certain labels of structured comments. Otherwise, all comments are displayed.", "c_cpp.configuration.commentContinuationPatterns.items.anyof.string.description": "The pattern that begins a multiline or single line comment block. The continuation pattern defaults to ' * ' for multiline comment blocks or this string for single line comment blocks.", "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.begin.description": "The pattern that begins a multiline or single line comment block.", "c_cpp.configuration.commentContinuationPatterns.items.anyof.object.continue.description": "The text that will be inserted on the next line when Enter is pressed inside a multiline or single line comment block.", diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index 220281edbe..ca0ed21aff 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -1300,6 +1300,7 @@ export class DefaultClient implements Client { dimInactiveRegions: settings_dimInactiveRegions, enhancedColorization: settings_enhancedColorization, suggestSnippets: settings_suggestSnippets, + simplifyStructuredComments: workspaceSettings.simplifyStructuredComments, loggingLevel: workspaceSettings.loggingLevel, workspaceParsingPriority: workspaceSettings.workspaceParsingPriority, workspaceSymbols: workspaceSettings.workspaceSymbols, diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index 4f93b8df39..dd758ac8b9 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -126,6 +126,7 @@ export class CppSettings extends Settings { public get workspaceParsingPriority(): string | undefined { return super.Section.get("workspaceParsingPriority"); } public get workspaceSymbols(): string | undefined { return super.Section.get("workspaceSymbols"); } public get exclusionPolicy(): string | undefined { return super.Section.get("exclusionPolicy"); } + public get simplifyStructuredComments(): boolean | undefined { return super.Section.get("simplifyStructuredComments"); } public get commentContinuationPatterns(): (string | CommentPattern)[] | undefined { return super.Section.get<(string | CommentPattern)[]>("commentContinuationPatterns"); } public get configurationWarnings(): string | undefined { return super.Section.get("configurationWarnings"); } public get preferredPathSeparator(): string | undefined { return super.Section.get("preferredPathSeparator"); } diff --git a/Extension/src/nativeStrings.json b/Extension/src/nativeStrings.json index bc6a153468..2376f363d6 100644 --- a/Extension/src/nativeStrings.json +++ b/Extension/src/nativeStrings.json @@ -189,5 +189,6 @@ "hint": "This label is for the return value description for a function. Usage example: 'Returns: Area of a shape.'" }, "deprecated_label": "Deprecated:", - "exceptions_label": "Exceptions:" + "exceptions_label": "Exceptions:", + "template_parameters_label": "Template Parameters:" }