Skip to content

Commit 25bb51b

Browse files
Add setting to only analyze open documents for references (#4170)
1 parent 949fa79 commit 25bb51b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

package.json

+5
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,11 @@
626626
"default": true,
627627
"description": "Displays a code lens above function definitions showing the number of times the function is referenced in the workspace. Large workspaces should disable this setting due to high performance impact."
628628
},
629+
"powershell.analyzeOpenDocumentsOnly": {
630+
"type": "boolean",
631+
"default": false,
632+
"description": "Only search for references within open documents. Enable this in large workspaces if memory is limited."
633+
},
629634
"powershell.bugReporting.project": {
630635
"type": "string",
631636
"default": "https://github.com/PowerShell/vscode-powershell",

src/settings.ts

+3
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export interface ISettings {
102102
cwd?: string;
103103
notebooks?: INotebooksSettings;
104104
enableReferencesCodeLens?: boolean;
105+
analyzeOpenDocumentsOnly?: boolean;
105106
}
106107

107108
export interface IStartAsLoginShellSettings {
@@ -273,6 +274,8 @@ export function load(): ISettings {
273274
configuration.get<string>("cwd", undefined),
274275
enableReferencesCodeLens:
275276
configuration.get<boolean>("enableReferencesCodeLens", true),
277+
analyzeOpenDocumentsOnly:
278+
configuration.get<boolean>("analyzeOpenDocumentsOnly", true),
276279
};
277280
}
278281

0 commit comments

Comments
 (0)