Skip to content

Commit

Permalink
fix(config): set a default memory limit (#235)
Browse files Browse the repository at this point in the history
  • Loading branch information
gelstudios authored and felixfbecker committed Dec 31, 2017
1 parent 9558c8a commit a3e2822
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
2 changes: 1 addition & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
const conf = vscode.workspace.getConfiguration('php');
const executablePath = conf.get<string>('executablePath') || 'php';

const memoryLimit = conf.get<string>('memoryLimit') || '-1';
const memoryLimit = conf.get<string>('memoryLimit') || '4G';

if (memoryLimit !== '-1' && !/^\d+[KMG]?$/.exec(memoryLimit)) {
const selected = await vscode.window.showErrorMessage(
Expand Down

0 comments on commit a3e2822

Please sign in to comment.