Add php configs as initialization options for the language server
Included options: * fileTypes - List of file types the language server should indexpull/77/head
parent
31cc5b78e9
commit
5206d4388a
64
package.json
64
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."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue