Skip to content

Commit

Permalink
Add setting to support max search results (#12131)
Browse files Browse the repository at this point in the history
  • Loading branch information
fearthecowboy authored Mar 21, 2024
1 parent 127588b commit 1ab766b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3078,6 +3078,14 @@
"maximum": 65536,
"scope": "machine"
},
"C_Cpp.maxSymbolSearchResults": {
"type": "integer",
"markdownDescription": "%c_cpp.configuration.maxSymbolSearchResults.markdownDescription%",
"default": 5000,
"minimum": 500,
"maximum": 10000,
"scope": "window"
},
"C_Cpp.intelliSense.maxCachedProcesses": {
"type": [
"integer",
Expand Down
6 changes: 6 additions & 0 deletions Extension/package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -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 '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."
]
},
"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": [
Expand Down
1 change: 1 addition & 0 deletions Extension/src/LanguageServer/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
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 @@ -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;
Expand Down Expand Up @@ -313,6 +314,7 @@ export class CppSettings extends Settings {

public get maxConcurrentThreads(): number | undefined | null { return super.Section.get<number | null>("maxConcurrentThreads"); }
public get maxMemory(): number | undefined | null { return super.Section.get<number | null>("maxMemory"); }
public get maxSymbolSearchResults(): number | undefined { return super.Section.get<number>("maxSymbolSearchResults"); }
public get maxCachedProcesses(): number | undefined | null { return super.Section.get<number | null>("maxCachedProcesses"); }
public get intelliSenseMaxCachedProcesses(): number | undefined | null { return super.Section.get<number | null>("intelliSense.maxCachedProcesses"); }
public get intelliSenseMaxMemory(): number | undefined | null { return super.Section.get<number | null>("intelliSense.maxMemory"); }
Expand Down

0 comments on commit 1ab766b

Please sign in to comment.