reformatcode
parent
35cd9c8074
commit
021c3655c5
|
@ -61,7 +61,8 @@
|
||||||
"php.memoryLimit": {
|
"php.memoryLimit": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": "-1",
|
"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)."
|
"description": "The memory limit of the php language server. [Number][K|M|G]. Use '-1' to allow unlimited use of the RAM(default).",
|
||||||
|
"schema": "!/^\d+(?:K|M|G|)$/"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
|
||||||
|
|
||||||
const memoryLimit = conf.get<string>('memoryLimit') || '-1';
|
const memoryLimit = conf.get<string>('memoryLimit') || '-1';
|
||||||
|
|
||||||
if (memoryLimit !== '-1' && !memoryLimit.match('~^(\d+)(K|M|G|)$~')) {
|
if (memoryLimit !== '-1' && !/^\d+(?:K|M|G|)$/.exec(memoryLimit)) {
|
||||||
const selected = await vscode.window.showErrorMessage(
|
const selected = await vscode.window.showErrorMessage(
|
||||||
'The memory limit you\'d provided is not numeric, nor "-1" nor valid php shorthand notation!',
|
'The memory limit you\'d provided is not numeric, nor "-1" nor valid php shorthand notation!',
|
||||||
'Open settings'
|
'Open settings'
|
||||||
|
|
Loading…
Reference in New Issue