From c214ed7197168f0f6d708ee80c38706fa172874a Mon Sep 17 00:00:00 2001 From: garrett serack Date: Thu, 21 Mar 2024 09:35:56 -0700 Subject: [PATCH 1/4] Add setting to support max search results --- Extension/package.json | 11 +++++++++++ Extension/package.nls.json | 6 ++++++ Extension/src/LanguageServer/client.ts | 1 + Extension/src/LanguageServer/settings.ts | 2 ++ 4 files changed, 20 insertions(+) diff --git a/Extension/package.json b/Extension/package.json index c014ddb7c3..76712fdaf6 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -3078,6 +3078,17 @@ "maximum": 65536, "scope": "machine" }, + "C_Cpp.maxSymbolSearchResults": { + "type": [ + "integer", + "null" + ], + "markdownDescription": "%c_cpp.configuration.maxSymbolSearchResults.markdownDescription%", + "default": 5000, + "minimum": 500, + "maximum": 10000, + "scope": "window" + }, "C_Cpp.intelliSense.maxCachedProcesses": { "type": [ "integer", diff --git a/Extension/package.nls.json b/Extension/package.nls.json index 67e1d9e218..f55f84cb2d 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -66,6 +66,12 @@ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] }, + "c_cpp.configuration.maxSymbolSearchResults.markdownDescription": { + "message": "The maximum number of results to show for GoTo Symbol. The default is 5000.", + "comment": [ + "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." + ] + }, "c_cpp.configuration.intelliSense.maxCachedProcesses.markdownDescription": { "message": "The maximum number of IntelliSense processes to keep running. The default of `null` (empty) uses value inherited from `#C_Cpp.maxCachedProcesses#`.", "comment": [ diff --git a/Extension/src/LanguageServer/client.ts b/Extension/src/LanguageServer/client.ts index affaa7a30c..e379855e71 100644 --- a/Extension/src/LanguageServer/client.ts +++ b/Extension/src/LanguageServer/client.ts @@ -1458,6 +1458,7 @@ export class DefaultClient implements Client { maxConcurrentThreads: workspaceSettings.maxConcurrentThreads, maxCachedProcesses: workspaceSettings.maxCachedProcesses, maxMemory: workspaceSettings.maxMemory, + maxSymbolSearchResults: workspaceSettings.maxSymbolSearchResults, loggingLevel: workspaceSettings.loggingLevel, workspaceParsingPriority: workspaceSettings.workspaceParsingPriority, workspaceSymbols: workspaceSettings.workspaceSymbols, diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index c5c096f391..00f6fefc34 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -142,6 +142,7 @@ export interface SettingsParams { maxConcurrentThreads: number | null | undefined; maxCachedProcesses: number | null | undefined; maxMemory: number | null | undefined; + maxSymbolSearchResults: number | null | undefined; loggingLevel: string | undefined; workspaceParsingPriority: string | undefined; workspaceSymbols: string | undefined; @@ -313,6 +314,7 @@ export class CppSettings extends Settings { public get maxConcurrentThreads(): number | undefined | null { return super.Section.get("maxConcurrentThreads"); } public get maxMemory(): number | undefined | null { return super.Section.get("maxMemory"); } + public get maxSymbolSearchResults(): number | undefined | null { return super.Section.get("maxSymbolSearchResults"); } public get maxCachedProcesses(): number | undefined | null { return super.Section.get("maxCachedProcesses"); } public get intelliSenseMaxCachedProcesses(): number | undefined | null { return super.Section.get("intelliSense.maxCachedProcesses"); } public get intelliSenseMaxMemory(): number | undefined | null { return super.Section.get("intelliSense.maxMemory"); } From 077ec4de815fcc50226cc707695678cf802e9ce0 Mon Sep 17 00:00:00 2001 From: Garrett Serack Date: Thu, 21 Mar 2024 10:02:52 -0700 Subject: [PATCH 2/4] Update package.nls.json description --- Extension/package.nls.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Extension/package.nls.json b/Extension/package.nls.json index f55f84cb2d..2bf7f7f14b 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -67,7 +67,7 @@ ] }, "c_cpp.configuration.maxSymbolSearchResults.markdownDescription": { - "message": "The maximum number of results to show for GoTo Symbol. The default is 5000.", + "message": "The maximum number of results to show for Go to Symbol. The default is 5000.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] From 004cc15167afc12d8ac72a569d1f077a96f7bcaf Mon Sep 17 00:00:00 2001 From: garrett serack Date: Thu, 21 Mar 2024 10:32:29 -0700 Subject: [PATCH 3/4] tweaks --- Extension/package.json | 5 +---- Extension/package.nls.json | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Extension/package.json b/Extension/package.json index 76712fdaf6..ce6285c3c6 100644 --- a/Extension/package.json +++ b/Extension/package.json @@ -3079,10 +3079,7 @@ "scope": "machine" }, "C_Cpp.maxSymbolSearchResults": { - "type": [ - "integer", - "null" - ], + "type": "integer", "markdownDescription": "%c_cpp.configuration.maxSymbolSearchResults.markdownDescription%", "default": 5000, "minimum": 500, diff --git a/Extension/package.nls.json b/Extension/package.nls.json index 2bf7f7f14b..7471e74041 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -67,7 +67,7 @@ ] }, "c_cpp.configuration.maxSymbolSearchResults.markdownDescription": { - "message": "The maximum number of results to show for Go to Symbol. The default is 5000.", + "message": "The maximum number of results to show for Go to Symbol in Workspace. The default is `5000`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] From fc85e70adb71f7f4b5aa1b7114dfd156b1230500 Mon Sep 17 00:00:00 2001 From: garrett serack Date: Thu, 21 Mar 2024 11:10:06 -0700 Subject: [PATCH 4/4] tweaks --- Extension/package.nls.json | 2 +- Extension/src/LanguageServer/settings.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Extension/package.nls.json b/Extension/package.nls.json index 7471e74041..7745216295 100644 --- a/Extension/package.nls.json +++ b/Extension/package.nls.json @@ -67,7 +67,7 @@ ] }, "c_cpp.configuration.maxSymbolSearchResults.markdownDescription": { - "message": "The maximum number of results to show for Go to Symbol in Workspace. The default is `5000`.", + "message": "The maximum number of results to show for 'Go to Symbol in Workspace'. The default is `5000`.", "comment": [ "Markdown text between `` should not be translated or localized (they represent literal text) and the capitalization, spacing, and punctuation (including the ``) should not be altered." ] diff --git a/Extension/src/LanguageServer/settings.ts b/Extension/src/LanguageServer/settings.ts index 00f6fefc34..48e1548564 100644 --- a/Extension/src/LanguageServer/settings.ts +++ b/Extension/src/LanguageServer/settings.ts @@ -314,7 +314,7 @@ export class CppSettings extends Settings { public get maxConcurrentThreads(): number | undefined | null { return super.Section.get("maxConcurrentThreads"); } public get maxMemory(): number | undefined | null { return super.Section.get("maxMemory"); } - public get maxSymbolSearchResults(): number | undefined | null { return super.Section.get("maxSymbolSearchResults"); } + public get maxSymbolSearchResults(): number | undefined { return super.Section.get("maxSymbolSearchResults"); } public get maxCachedProcesses(): number | undefined | null { return super.Section.get("maxCachedProcesses"); } public get intelliSenseMaxCachedProcesses(): number | undefined | null { return super.Section.get("intelliSense.maxCachedProcesses"); } public get intelliSenseMaxMemory(): number | undefined | null { return super.Section.get("intelliSense.maxMemory"); }