Skip to content

Commit

Permalink
Add setting to only analyze open documents for references (#4170)
Browse files Browse the repository at this point in the history
  • Loading branch information
SeeminglyScience authored Sep 27, 2022
1 parent 949fa79 commit 25bb51b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,11 @@
"default": true,
"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."
},
"powershell.analyzeOpenDocumentsOnly": {
"type": "boolean",
"default": false,
"description": "Only search for references within open documents. Enable this in large workspaces if memory is limited."
},
"powershell.bugReporting.project": {
"type": "string",
"default": "https://github.com/PowerShell/vscode-powershell",
Expand Down
3 changes: 3 additions & 0 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export interface ISettings {
cwd?: string;
notebooks?: INotebooksSettings;
enableReferencesCodeLens?: boolean;
analyzeOpenDocumentsOnly?: boolean;
}

export interface IStartAsLoginShellSettings {
Expand Down Expand Up @@ -273,6 +274,8 @@ export function load(): ISettings {
configuration.get<string>("cwd", undefined),
enableReferencesCodeLens:
configuration.get<boolean>("enableReferencesCodeLens", true),
analyzeOpenDocumentsOnly:
configuration.get<boolean>("analyzeOpenDocumentsOnly", true),
};
}

Expand Down

0 comments on commit 25bb51b

Please sign in to comment.