diff --git a/package.json b/package.json index 3f8470c..9585ce5 100644 --- a/package.json +++ b/package.json @@ -38,20 +38,34 @@ "workspaceContains:**/*.php" ], "contributes": { - "configuration": { - "type": "object", - "title": "PHP IntelliSense", - "properties": { - "phpIntelliSense.fileTypes": { - "type": "array", - "default": [ - ".php" - ], - "description": "An array of file types which should be indexed by the language server." - } - } - } - }, + "configuration": { + "type": "object", + "title": "PHP IntelliSense", + "properties": { + "php.memoryLimit": { + "type": "string", + "default": "4095M", + "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": { + "type": [ + "string", + "null" + ], + "default": null, + "description": "The path to a PHP 7+ executable." + }, + "php.fileTypes": { + "type": [ + "array" + ], + "default": [".php"], + "description": "List of file types that should be indexed by the php language server. (Restart required)" + } + } + } + }, "main": "./out/extension", "scripts": { "build": "tsc -p .", @@ -101,27 +115,5 @@ "assets": "php-intellisense.vsix" } ] - }, - "contributes": { - "configuration": { - "type": "object", - "title": "PHP IntelliSense", - "properties": { - "php.memoryLimit": { - "type": "string", - "default": "4095M", - "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": { - "type": [ - "string", - "null" - ], - "default": null, - "description": "The path to a PHP 7+ executable." - } - } - } } } diff --git a/src/extension.ts b/src/extension.ts index fc9b83f..62e93d2 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -108,7 +108,8 @@ export async function activate(context: vscode.ExtensionContext): Promise configurationSection: 'php', // Notify the server about changes to PHP files in the workspace fileEvents: vscode.workspace.createFileSystemWatcher('**/*.php') - } + }, + initializationOptions: conf }; // Create the language client and start the client.