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 a maximum search results for goto symbol #12131

Merged
merged 4 commits into from
Mar 21, 2024
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
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,
fearthecowboy marked this conversation as resolved.
Show resolved Hide resolved
"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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this supposed to be null?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no. @fearthecowboy, can you fix this one too?

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
Loading