coc-phpls
marlonfanPHP language server extension for coc.nvim
Published Package Summary
coc-phpls
PHP language server extension for coc.nvim.
Install
In your vim/neovim, run command:
:CocInstall coc-phpls
Features
Language server features provided by intelephense-docs.
Premium features
add licence key to your coc-settings.json file
e.g:
{
"intelephense.licenceKey": "your licence key",
}
Development
- Run yarn build or yarn build:watch
- Link extension
cd ~/github/coc-phpls && yarn link
cd ~/.config/coc/extensions && yarn link coc-phpls
- Add "coc-phpls": "*" to dependencies in ~/.config/coc/extensions/package.json
JetBrains OS licenses
coc-phpls had been being developed with JetBrains IDE under the free JetBrains Open Source license(s) granted by JetBrains s.r.o., hence I would like to express my thanks here.
License
MIT
- PHP language server extension for coc.nvim
- onLanguage:php
Want to build, test, or contribute to coc.nvim extensions? Explore our official SDK and testing toolkits.
Open Developer GuideVersion History
This published npm package does not include a history.md or changelog.md file. Browse its npm versions for available release information.
Contributed Commands
All contributes.commands entries from the published package manifest for coc-phpls@2.2.4.
This package does not declare any contributed commands.
Configuration Schema
All contributes.configuration entries from the published package manifest, including each raw property schema for coc-settings.json.
Raw JSON Schema
{
"type": "string",
"default": "",
"description": "Path to intelephense module, you can use a custom version of intelephense by modifying this setting to include the full path."
}Raw JSON Schema
{
"type": "boolean",
"default": true,
"description": "is enable php lsp"
}Raw JSON Schema
{
"type": "array",
"items": {
"enum": [
"aerospike",
"amqp",
"apache",
"apcu",
"bcmath",
"blackfire",
"bz2",
"calendar",
"cassandra",
"com_dotnet",
"Core",
"couchbase",
"crypto",
"ctype",
"cubrid",
"curl",
"date",
"dba",
"decimal",
"dom",
"ds",
"enchant",
"Ev",
"event",
"exif",
"fann",
"FFI",
"ffmpeg",
"fileinfo",
"filter",
"fpm",
"ftp",
"gd",
"gearman",
"geoip",
"geos",
"gettext",
"gmagick",
"gmp",
"gnupg",
"grpc",
"hash",
"http",
"ibm_db2",
"iconv",
"igbinary",
"imagick",
"imap",
"inotify",
"interbase",
"intl",
"json",
"judy",
"ldap",
"leveldb",
"libevent",
"libsodium",
"libxml",
"lua",
"LuaSandbox",
"lzf",
"mailparse",
"mapscript",
"mbstring",
"mcrypt",
"memcache",
"memcached",
"meminfo",
"meta",
"ming",
"mongo",
"mongodb",
"mosquitto-php",
"mqseries",
"msgpack",
"mssql",
"mysql",
"mysql_xdevapi",
"mysqli",
"ncurses",
"newrelic",
"oauth",
"oci8",
"odbc",
"openssl",
"parallel",
"Parle",
"pcntl",
"pcov",
"pcre",
"pdflib",
"PDO",
"pdo_ibm",
"pdo_mysql",
"pdo_pgsql",
"pdo_sqlite",
"pgsql",
"Phar",
"phpdbg",
"posix",
"pspell",
"pthreads",
"radius",
"rar",
"rdkafka",
"readline",
"recode",
"redis",
"Reflection",
"regex",
"rpminfo",
"rrd",
"SaxonC",
"session",
"shmop",
"SimpleXML",
"snmp",
"soap",
"sockets",
"sodium",
"solr",
"SPL",
"SplType",
"SQLite",
"sqlite3",
"sqlsrv",
"ssh2",
"standard",
"stats",
"stomp",
"suhosin",
"superglobals",
"svm",
"svn",
"sybase",
"sync",
"sysvmsg",
"sysvsem",
"sysvshm",
"tidy",
"tokenizer",
"uopz",
"uv",
"v8js",
"wddx",
"win32service",
"winbinder",
"wincache",
"wordpress",
"xcache",
"xdebug",
"xhprof",
"xlswriter",
"xml",
"xmlreader",
"xmlrpc",
"xmlwriter",
"xsl",
"xxtea",
"yaf",
"yaml",
"yar",
"zend",
"Zend OPcache",
"ZendCache",
"ZendDebugger",
"ZendUtils",
"zip",
"zlib",
"zmq",
"zookeeper"
],
"type": "string"
},
"scope": "window",
"default": [
"apache",
"bcmath",
"bz2",
"calendar",
"com_dotnet",
"Core",
"ctype",
"curl",
"date",
"dba",
"dom",
"enchant",
"exif",
"FFI",
"fileinfo",
"filter",
"fpm",
"ftp",
"gd",
"gettext",
"gmp",
"hash",
"iconv",
"imap",
"intl",
"json",
"ldap",
"libxml",
"mbstring",
"meta",
"mysqli",
"oci8",
"odbc",
"openssl",
"pcntl",
"pcre",
"PDO",
"pdo_ibm",
"pdo_mysql",
"pdo_pgsql",
"pdo_sqlite",
"pgsql",
"Phar",
"posix",
"pspell",
"readline",
"Reflection",
"session",
"shmop",
"SimpleXML",
"snmp",
"soap",
"sockets",
"sodium",
"SPL",
"sqlite3",
"standard",
"superglobals",
"sysvmsg",
"sysvsem",
"sysvshm",
"tidy",
"tokenizer",
"xml",
"xmlreader",
"xmlrpc",
"xmlwriter",
"xsl",
"Zend OPcache",
"zip",
"zlib"
],
"description": "Configure stub files for built in symbols and common extensions. The default setting includes PHP core and all bundled extensions."
}Raw JSON Schema
{
"type": "string",
"default": "",
"description": "enable phpls server trace log?"
}Raw JSON Schema
{
"type": "string",
"scope": "machine",
"description": "Path to a Node.js executable. Use this if you wish to use a different version of Node.js. Defaults to Node.js shipped with VSCode."
}Raw JSON Schema
{
"type": "number",
"scope": "window",
"description": "Maximum memory (in MB) that the server should use. On some systems this may only have effect when runtime has been set. Minimum 256."
}Raw JSON Schema
{
"type": "string",
"default": ""
}Raw JSON Schema
{
"enum": [
"off",
"messages",
"verbose"
],
"type": "string",
"scope": "window",
"default": "off",
"description": "Traces the communication between VSCode and the intelephense language server."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [
"**/.git/**",
"**/.svn/**",
"**/.hg/**",
"**/CVS/**",
"**/.DS_Store/**",
"**/node_modules/**",
"**/bower_components/**",
"**/vendor/**/{Tests,tests}/**",
"**/.history/**",
"**/vendor/**/vendor/**"
],
"description": "Configure glob patterns to exclude certain files and folders from all language server features. Inherits from files.exclude."
}Raw JSON Schema
{
"type": "number",
"scope": "window",
"default": 5000000,
"description": "Maximum file size in bytes."
}Raw JSON Schema
{
"enum": [
"psr12",
"allman",
"k&r"
],
"type": "string",
"scope": "window",
"default": "psr12",
"description": "Controls formatting style of braces",
"enumDescriptions": [
"PHP-FIG PSR-2 and PSR-12 style. A mix of Allman and K&R",
"Allman. Opening brace on the next line.",
"K&R (1TBS). Opening brace on the same line."
]
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables formatting"
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [
"**/vendor/**"
],
"description": "Glob patterns to exclude files and folders from having symbols renamed. Rename operation will fail if references and/or definitions are found in excluded files/folders."
}Raw JSON Schema
{
"enum": [
"onType",
"onSave"
],
"type": "string",
"scope": "window",
"default": "onType",
"description": "Controls when diagnostics are run.",
"enumDescriptions": [
"Diagnostics will run as changes are made to the document.",
"Diagnostics will run when the document is saved."
]
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Adds `@return void` to auto generated phpdoc for definitions that do not return a value."
}Raw JSON Schema
{
"enum": [
"snippet",
"text"
],
"type": "string",
"scope": "window",
"default": "snippet",
"enumDescriptions": [
"Auto generated phpdoc is returned in snippet format. Templates are partially resolved by evaluating phpdoc specific variables only.",
"Auto generated phpdoc is returned as plain text. Templates are resolved completely by the server."
]
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": null,
"description": "Anonymous usage and crash data will be sent to Azure Application Insights."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables diagnostics."
}Raw JSON Schema
{
"type": "array",
"scope": "window",
"default": [
"*.php",
"*.phtml"
],
"description": "Configure glob patterns to make files available for language server features. Inherits from files.associations."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"default": [
"**/vendor/**"
],
"description": "Glob patterns matching files and folders that should be excluded from references search."
}Raw JSON Schema
{
"type": "number",
"scope": "window",
"default": 100,
"description": "The maximum number of completion items returned per request."
}Raw JSON Schema
{
"type": "object",
"scope": "window",
"default": {
"tags": [
"@package ${1:$SYMBOL_NAMESPACE}"
],
"summary": "$1"
},
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of snippet strings representing phpdoc tags."
},
"summary": {
"type": "string",
"description": "A snippet string representing a phpdoc summary."
},
"description": {
"type": "string",
"description": "A snippet string representing a phpdoc description."
}
},
"description": "An object that describes the format of generated class/interface/trait phpdoc. The following snippet variables are available: SYMBOL_NAME; SYMBOL_KIND; SYMBOL_TYPE; SYMBOL_NAMESPACE."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables deprecated diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables diagnostics on type compatibility of arguments, property assignments, and return statements where types have been declared."
}Raw JSON Schema
{
"type": "string",
"scope": "window",
"default": "8.0.0",
"description": "A semver compatible string that represents the target PHP version. Used for providing version appropriate suggestions and diagnostics. PHP 5.3.0 and greater supported."
}Raw JSON Schema
{
"type": "object",
"scope": "window",
"default": {
"tags": [
"@param ${1:$SYMBOL_TYPE} $SYMBOL_NAME $2",
"@return ${1:$SYMBOL_TYPE} $2",
"@throws ${1:$SYMBOL_TYPE} $2"
],
"summary": "$1"
},
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of snippet strings representing phpdoc tags."
},
"summary": {
"type": "string",
"description": "A snippet string representing a phpdoc summary."
},
"description": {
"type": "string",
"description": "A snippet string representing a phpdoc description."
}
},
"description": "An object that describes the format of generated function/method phpdoc. The following snippet variables are available: SYMBOL_NAME; SYMBOL_KIND; SYMBOL_TYPE; SYMBOL_NAMESPACE."
}Raw JSON Schema
{
"type": "object",
"scope": "window",
"default": {
"tags": [
"@var ${1:$SYMBOL_TYPE}"
],
"summary": "$1"
},
"properties": {
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of snippet strings representing phpdoc tags."
},
"summary": {
"type": "string",
"description": "A snippet string representing a phpdoc summary."
},
"description": {
"type": "string",
"description": "A snippet string representing a phpdoc description."
}
},
"description": "An object that describes the format of generated property phpdoc. The following snippet variables are available: SYMBOL_NAME; SYMBOL_KIND; SYMBOL_TYPE; SYMBOL_NAMESPACE."
}Raw JSON Schema
{
"type": "string",
"scope": "resource",
"description": "The directory of the entry point to the application (directory of index.php). Can be absolute or relative to the workspace folder. Used for resolving script inclusion and path suggestions."
}Raw JSON Schema
{
"type": "array",
"items": {
"type": "string"
},
"scope": "resource",
"description": "The include paths (as individual path items) as defined in the include_path ini setting or paths to external libraries. Can be absolute or relative to the workspace folder. Used for resolving script inclusion and/or adding external symbols to folder."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": false,
"description": "When enabled '<?' will be parsed as a PHP open tag. Defaults to false."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables argument count diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables unused variable, private member, and import diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables undefined class, interface and trait diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables duplicate symbol diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables undefined method diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "DEPRECATED. Use the setting for each symbol category."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables unexpected token diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables diagnostics in embedded languages."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": false,
"description": "Fully qualified names will be used for types when true. When false short type names will be used and imported where appropriate. Overrides intelephense.completion.insertUseDeclaration."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables undefined constant diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables undefined function diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables undefined variable diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Use declarations will be automatically inserted for namespaced classes, traits, interfaces, functions, and constants."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables reporting of various language constraint errors."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables undefined static property diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Method and function completions will include parentheses and trigger parameter hints."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables reporting of problems associated with method and class implementations. For example, unimplemented methods or method signature incompatibilities."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Enables undefined class constant diagnostics."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Resolves `BaseClass|static` union types to `static` instead of `BaseClass`."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": false,
"description": "Global namespace constants and functions will be fully qualified (prefixed with a backslash)."
}Raw JSON Schema
{
"type": "boolean",
"scope": "window",
"default": true,
"description": "Resolves `ArrayAccess` and `Traversable` implementations that are unioned with a typed array to generic syntax. eg `ArrayAccessOrTraversable|ElementType[]` => `ArrayAccessOrTraversable<mixed, ElementType>`."
}