Add php configs as initialization options for the language server

Included options:

* fileTypes - List of file types the language server should index
pull/77/head
Jürgen Steitz 2018-08-29 20:50:12 +02:00
parent 31cc5b78e9
commit 5206d4388a
2 changed files with 30 additions and 37 deletions

View File

@ -42,12 +42,26 @@
"type": "object",
"title": "PHP IntelliSense",
"properties": {
"phpIntelliSense.fileTypes": {
"type": "array",
"default": [
".php"
"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"
],
"description": "An array of file types which should be indexed by the language server."
"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)"
}
}
}
@ -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."
}
}
}
}
}

View File

@ -108,7 +108,8 @@ export async function activate(context: vscode.ExtensionContext): Promise<void>
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.