From e42e756622ae1d2c4c0dc92a28750c7ee030e152 Mon Sep 17 00:00:00 2001 From: Patrick Meinecke Date: Mon, 12 Sep 2022 12:49:59 -0400 Subject: [PATCH 1/2] Add setting to ref search only open documents --- src/settings.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/settings.ts b/src/settings.ts index 3405de1d77..8378d0437f 100644 --- a/src/settings.ts +++ b/src/settings.ts @@ -102,6 +102,7 @@ export interface ISettings { cwd?: string; notebooks?: INotebooksSettings; enableReferencesCodeLens?: boolean; + analyzeOpenDocumentsOnly?: boolean; } export interface IStartAsLoginShellSettings { @@ -273,6 +274,8 @@ export function load(): ISettings { configuration.get("cwd", undefined), enableReferencesCodeLens: configuration.get("enableReferencesCodeLens", true), + analyzeOpenDocumentsOnly: + configuration.get("analyzeOpenDocumentsOnly", true), }; } From 701f9eb483dcb1da4f4cd453e68152148091740c Mon Sep 17 00:00:00 2001 From: Patrick Meinecke Date: Wed, 14 Sep 2022 14:01:18 -0400 Subject: [PATCH 2/2] Add package.json for the setting --- package.json | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/package.json b/package.json index 3e8992bfad..3cc92e74fc 100644 --- a/package.json +++ b/package.json @@ -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",