Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: support intellisense options in vscode #77

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
70 changes: 47 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,52 @@
"onLanguage:php",
"workspaceContains:**/*.php"
],
"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."
},
"php.fileTypes": {
"type": [
"array"
],
"default": [
".php"
],
"description": "List of file types that should be indexed by the php language server. (Restart required)"
},
"php.fileSizeLimit": {
"type": [
"string"
],
"default": "150K",
"description": "The file size limit of the php language server. [Number][K|M|G]. Use '-1' to allow unlimited file size. (Restart required)",
"pattern": "^\\d+[KMG]?$"
},
"php.excludeFiles": {
"type": [
"array"
],
"default": [],
"description": "Files and folders that should be excluded from indexing. (Restart required)"
}
}
}
},
"main": "./out/extension",
"scripts": {
"build": "tsc -p .",
Expand All @@ -63,7 +109,7 @@
"dependencies": {
"mz": "^2.4.0",
"semver": "^5.3.0",
"vscode-languageclient": "^3.0.3"
"vscode-languageclient": "^3.5.1"
},
"commitlint": {
"extends": [
Expand All @@ -86,27 +132,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."
}
}
}
}
}
3 changes: 2 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down