From a3e28229046a518099cd1272e7d0c912a34483de Mon Sep 17 00:00:00 2001 From: Eric Romano Date: Sun, 31 Dec 2017 02:10:46 -0500 Subject: [PATCH] fix(config): set a default memory limit (#235) --- package.json | 4 ++-- src/extension.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 60df377b..431210e0 100644 --- a/package.json +++ b/package.json @@ -94,8 +94,8 @@ "properties": { "php.memoryLimit": { "type": "string", - "default": "-1", - "description": "The memory limit of the php language server. [Number][K|M|G]. Use '-1' to allow unlimited use of the RAM(default).", + "default": "4G", + "description": "The memory limit of the php language server. [Number][K|M|G]. Use '-1' to allow unlimited use of the RAM (default is 4G).", "pattern": "^\\d+[KMG]?$" }, "php.executablePath": { diff --git a/src/extension.ts b/src/extension.ts index ae7a779b..9cc2ceb1 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -12,7 +12,7 @@ export async function activate(context: vscode.ExtensionContext): Promise const conf = vscode.workspace.getConfiguration('php'); const executablePath = conf.get('executablePath') || 'php'; - const memoryLimit = conf.get('memoryLimit') || '-1'; + const memoryLimit = conf.get('memoryLimit') || '4G'; if (memoryLimit !== '-1' && !/^\d+[KMG]?$/.exec(memoryLimit)) { const selected = await vscode.window.showErrorMessage(