├── .github ├── issue_template.md └── workflows │ └── ci.yml ├── .gitignore ├── CHANGELOG.md ├── LICENSE.md ├── README.md ├── composer.json ├── composer.lock ├── lib └── main.js └── package.json /.github/issue_template.md: -------------------------------------------------------------------------------- 1 | A few things to know before you create an issue 2 | 3 | * This package requires [Atom 1.21](https://atom.io) 4 | * We launch a "language server" process on your machine that understands the language you are editing 5 | * What that server can do - syntax compatibility, whether it supports formatting or outlines etc - is outside of our control 6 | * You can see what the language server supports by checking out our README and following the link after "powered by" 7 | * "disconnected", "JSONRPC" or "Content-Header" errors indicate that server process died. We're working on better recovery right now 8 | 9 | If you have understood all this, please remove this text and start writing your issue :) 10 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: [push] 4 | 5 | env: 6 | CI: true 7 | 8 | jobs: 9 | Test: 10 | strategy: 11 | matrix: 12 | os: [ubuntu-latest, macos-latest, windows-latest] 13 | channel: [stable, beta] 14 | runs-on: ${{ matrix.os }} 15 | steps: 16 | - uses: actions/checkout@v1 17 | - uses: UziTech/action-setup-atom@v2 18 | with: 19 | version: ${{ matrix.channel }} 20 | - name: Install dependencies 21 | run: apm install 22 | 23 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | server/ 4 | vendor/ 5 | *.tar.gz 6 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## v0.7.18 2 | 3 | - Replace line-breaks in HTML description 4 | - Update atom-languageclient to 0.9.9 5 | 6 | ## v0.7.17 7 | 8 | - Update language server to 5.4.6 9 | 10 | ## v0.7.16 11 | 12 | - Update language server to 5.4.4 13 | 14 | ## v0.7.15 15 | 16 | - Update language server to 5.4.2 17 | 18 | ## v0.7.14 19 | 20 | - Bump autocomplete provider model to 4.0.0 so `Class1::` etc. works 21 | 22 | ## v0.7.13 23 | 24 | - Update atom-languageclient to 0.9.4 to allow autocomplete on `->` etc. thanks @pelallemant 25 | 26 | ## v0.7.12 27 | 28 | - Update atom-languageclient to 0.9.3 29 | 30 | ## v0.7.11 31 | 32 | - Language server updated to 5.4.0 which add pseudo-keywords like int, bool, strict_types to completion 33 | 34 | ## v0.7.10 35 | 36 | - Added option to change AutoComplete suggestions pritority (thanks @martinfojtik) 37 | 38 | ## v0.7.9 39 | 40 | - Update atom-languageclient to 0.9.2 which includes better autocomplete 41 | 42 | ## v0.7.8 43 | 44 | - Language server updated to 5.3.7 45 | - Now capable of running on PHP 7.0 again 46 | 47 | ## v0.7.7 48 | 49 | - Now checks for minimum version of PHP 7.1 which is required by language server 50 | 51 | ## v0.7.6 52 | 53 | - Language server updated to 5.3.6 which includes completion and DefinitionResolver fixes (thanks @vinkla) 54 | 55 | ## v0.7.5 56 | 57 | - Language server updated to 5.2.0 which includes Signature Help and fixes (thanks @vinkla) 58 | - Update atom-languageclient to 0.8.3 which includes autocomplete and other fixes 59 | 60 | ## v0.7.4 61 | 62 | - Language server updated to 5.2.0 which includes Signature Help and fixes (thanks @vinkla) 63 | 64 | ## v0.7.3 65 | 66 | - Repackage 5.1.0 language server without prefix (script issue on macOS) 67 | 68 | ## v0.7.2 69 | 70 | - Fix download URL for 5.1.0 language server 71 | 72 | ## v0.7.1 73 | 74 | - Update atom-languageclient to 0.7.0 which includes 75 | - Sorting autocomplete results 76 | - Snippet completion type items 77 | - Busy signals for startup and shutdown 78 | - Fixes broken signals in prior v0.7.0 release 79 | 80 | ## v0.7.0 81 | 82 | - Update PHP language server to 5.1.0 83 | 84 | ## v0.6.10 85 | 86 | - Use busy signal instead of status bar for installation progress 87 | - Composer script added to package.json for ease of preparing new builds 88 | - Update README to remove references to beta 89 | 90 | ## v0.6.9 91 | 92 | - Fix PHP version detection on some systems where stdout delayed 93 | - Address possible async issues in install that resulted in console warnings 94 | 95 | ## v0.6.8 96 | 97 | - Setting for PHP path now points to the PHP binary itself not the folder 98 | 99 | ## v0.6.7 100 | 101 | - Update to 4.6.1 of https://github.com/felixfbecker/php-language-server to fix memory leak 102 | - Checks installed PHP runtime version is 7 or later 103 | - Further improvements to error reporting 104 | 105 | ## v0.6.6 106 | 107 | - Do not display an error dialog when shutting down the language server 108 | 109 | ## v0.6.5 110 | 111 | - Default memory limit to 2GB to avoid issues on 32-bit systems 112 | 113 | ## v0.6.4 114 | 115 | - Allow setting of the memory limit 116 | - Improve error reporting 117 | - Fix description of connection type setting 118 | 119 | ## v0.6.3 120 | 121 | - Allow connection type to be configured in settings 122 | - Deeper error logging via atom-languageclient - enable with atom.config.set('core.debugLSP', true) 123 | 124 | ## v0.6.2 125 | 126 | - Add memory limit setting to work around language server issue on 32-bit systems (set it to 2G) 127 | - Repackage language server to avoid issues with symlinks 128 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017 GitHub Inc. 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ##### Atom and all repositories under Atom will be archived on December 15, 2022. Learn more in our [official announcement](https://github.blog/2022-06-08-sunsetting-atom/) 2 | # IDE-PHP package 3 | [](https://github.com/atom/ide-php/actions/workflows/ci.yml) 4 | 5 | PHP language support for Atom-IDE, powered by [FelixFBeckers PHP Language Server](https://github.com/felixfbecker/php-language-server). 6 | 7 | Requires [Atom 1.21](https://atom.io/) and a PHP 7.0 runtime installed on your system. 8 | 9 |  10 | 11 | ## Early Access 12 | 13 | This package is currently an early access release. To expose the functionality within Atom install the abandoned [`atom-ide-ui`](https://atom.io/packages/atom-ide-ui) package or the actively developed community packages: 14 | 15 | - [`atom-ide-datatip`](https://github.com/atom-ide-community/atom-ide-datatip#readme) 16 | - [`atom-ide-definitions`](https://github.com/atom-ide-community/atom-ide-definitions#readme) 17 | - [`atom-ide-signature-help`](https://github.com/atom-ide-community/atom-ide-signature-help#readme) 18 | 19 | ## Features 20 | 21 | * Auto completion 22 | * Diagnostics (errors & warnings) 23 | * Document outline 24 | * Find references 25 | * Go to definition 26 | * Hover 27 | * Signature help 28 | 29 | ## Contributing 30 | Always feel free to help out! Whether it's [filing bugs and feature requests](https://github.com/atom/languageserver-php/issues/new) or working on some of the [open issues](https://github.com/atom/languageserver-php/issues), Atom's [contributing guide](https://github.com/atom/atom/blob/master/CONTRIBUTING.md) will help get you started while the [guide for contributing to packages](https://github.com/atom/atom/blob/master/docs/contributing-to-packages.md) has some extra information. 31 | 32 | ## License 33 | MIT License. See [the license](LICENSE.md) for more details. 34 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "minimum-stability": "dev", 3 | "prefer-stable": true, 4 | "require": { 5 | "felixfbecker/language-server": "^5.4" 6 | }, 7 | "scripts": { 8 | "parse-stubs": "LanguageServer\\ComposerScripts::parseStubs", 9 | "post-update-cmd": "@parse-stubs", 10 | "post-install-cmd": "@parse-stubs" 11 | }, 12 | "config": { 13 | "platform": { 14 | "php": "7.0" 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- 1 | { 2 | "_readme": [ 3 | "This file locks the dependencies of your project to a known state", 4 | "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", 5 | "This file is @generated automatically" 6 | ], 7 | "content-hash": "b18cc4845a7c5ea61a87648ace0e5d30", 8 | "packages": [ 9 | { 10 | "name": "composer/xdebug-handler", 11 | "version": "1.3.0", 12 | "source": { 13 | "type": "git", 14 | "url": "https://github.com/composer/xdebug-handler.git", 15 | "reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c" 16 | }, 17 | "dist": { 18 | "type": "zip", 19 | "url": "https://api.github.com/repos/composer/xdebug-handler/zipball/b8e9745fb9b06ea6664d8872c4505fb16df4611c", 20 | "reference": "b8e9745fb9b06ea6664d8872c4505fb16df4611c", 21 | "shasum": "" 22 | }, 23 | "require": { 24 | "php": "^5.3.2 || ^7.0", 25 | "psr/log": "^1.0" 26 | }, 27 | "require-dev": { 28 | "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" 29 | }, 30 | "type": "library", 31 | "autoload": { 32 | "psr-4": { 33 | "Composer\\XdebugHandler\\": "src" 34 | } 35 | }, 36 | "notification-url": "https://packagist.org/downloads/", 37 | "license": [ 38 | "MIT" 39 | ], 40 | "authors": [ 41 | { 42 | "name": "John Stevenson", 43 | "email": "john-stevenson@blueyonder.co.uk" 44 | } 45 | ], 46 | "description": "Restarts a process without xdebug.", 47 | "keywords": [ 48 | "Xdebug", 49 | "performance" 50 | ], 51 | "time": "2018-08-31T19:07:57+00:00" 52 | }, 53 | { 54 | "name": "felixfbecker/advanced-json-rpc", 55 | "version": "v3.0.3", 56 | "source": { 57 | "type": "git", 58 | "url": "https://github.com/felixfbecker/php-advanced-json-rpc.git", 59 | "reference": "241c470695366e7b83672be04ea0e64d8085a551" 60 | }, 61 | "dist": { 62 | "type": "zip", 63 | "url": "https://api.github.com/repos/felixfbecker/php-advanced-json-rpc/zipball/241c470695366e7b83672be04ea0e64d8085a551", 64 | "reference": "241c470695366e7b83672be04ea0e64d8085a551", 65 | "shasum": "" 66 | }, 67 | "require": { 68 | "netresearch/jsonmapper": "^1.0", 69 | "php": ">=7.0", 70 | "phpdocumentor/reflection-docblock": "^4.0.0" 71 | }, 72 | "require-dev": { 73 | "phpunit/phpunit": "^6.0.0" 74 | }, 75 | "type": "library", 76 | "autoload": { 77 | "psr-4": { 78 | "AdvancedJsonRpc\\": "lib/" 79 | } 80 | }, 81 | "notification-url": "https://packagist.org/downloads/", 82 | "license": [ 83 | "ISC" 84 | ], 85 | "authors": [ 86 | { 87 | "name": "Felix Becker", 88 | "email": "felix.b@outlook.com" 89 | } 90 | ], 91 | "description": "A more advanced JSONRPC implementation", 92 | "time": "2018-09-10T08:58:41+00:00" 93 | }, 94 | { 95 | "name": "felixfbecker/language-server", 96 | "version": "v5.4.6", 97 | "source": { 98 | "type": "git", 99 | "url": "https://github.com/felixfbecker/php-language-server.git", 100 | "reference": "1da3328bc23ebd6418529035d357481c8c028640" 101 | }, 102 | "dist": { 103 | "type": "zip", 104 | "url": "https://api.github.com/repos/felixfbecker/php-language-server/zipball/1da3328bc23ebd6418529035d357481c8c028640", 105 | "reference": "1da3328bc23ebd6418529035d357481c8c028640", 106 | "shasum": "" 107 | }, 108 | "require": { 109 | "composer/xdebug-handler": "^1.0", 110 | "felixfbecker/advanced-json-rpc": "^3.0.0", 111 | "felixfbecker/language-server-protocol": "^1.0.1", 112 | "jetbrains/phpstorm-stubs": "dev-master", 113 | "microsoft/tolerant-php-parser": "0.0.*", 114 | "netresearch/jsonmapper": "^1.0", 115 | "php": "^7.0", 116 | "phpdocumentor/reflection-docblock": "^4.0.0", 117 | "psr/log": "^1.0", 118 | "sabre/event": "^5.0", 119 | "sabre/uri": "^2.0", 120 | "webmozart/glob": "^4.1", 121 | "webmozart/path-util": "^2.3" 122 | }, 123 | "require-dev": { 124 | "phpunit/phpunit": "^6.3", 125 | "squizlabs/php_codesniffer": "^3.1" 126 | }, 127 | "bin": [ 128 | "bin/php-language-server.php" 129 | ], 130 | "type": "library", 131 | "autoload": { 132 | "psr-4": { 133 | "LanguageServer\\": "src/" 134 | }, 135 | "files": [ 136 | "src/utils.php", 137 | "src/FqnUtilities.php", 138 | "src/ParserHelpers.php" 139 | ] 140 | }, 141 | "notification-url": "https://packagist.org/downloads/", 142 | "license": [ 143 | "ISC" 144 | ], 145 | "authors": [ 146 | { 147 | "name": "Felix Becker", 148 | "email": "felix.b@outlook.com" 149 | } 150 | ], 151 | "description": "PHP Implementation of the Visual Studio Code Language Server Protocol", 152 | "keywords": [ 153 | "autocompletion", 154 | "code", 155 | "intellisense", 156 | "language", 157 | "microsoft", 158 | "php", 159 | "refactor", 160 | "server", 161 | "studio", 162 | "visual" 163 | ], 164 | "time": "2018-11-13T17:33:21+00:00" 165 | }, 166 | { 167 | "name": "felixfbecker/language-server-protocol", 168 | "version": "v1.2.0", 169 | "source": { 170 | "type": "git", 171 | "url": "https://github.com/felixfbecker/php-language-server-protocol.git", 172 | "reference": "1bdd1bcc95428edf85ec04c7b558d0886c07280f" 173 | }, 174 | "dist": { 175 | "type": "zip", 176 | "url": "https://api.github.com/repos/felixfbecker/php-language-server-protocol/zipball/1bdd1bcc95428edf85ec04c7b558d0886c07280f", 177 | "reference": "1bdd1bcc95428edf85ec04c7b558d0886c07280f", 178 | "shasum": "" 179 | }, 180 | "require": { 181 | "php": "^7.0" 182 | }, 183 | "require-dev": { 184 | "phpstan/phpstan": "*", 185 | "phpunit/phpunit": "^6.3", 186 | "squizlabs/php_codesniffer": "^3.1" 187 | }, 188 | "type": "library", 189 | "autoload": { 190 | "psr-4": { 191 | "LanguageServerProtocol\\": "src/" 192 | } 193 | }, 194 | "notification-url": "https://packagist.org/downloads/", 195 | "license": [ 196 | "ISC" 197 | ], 198 | "authors": [ 199 | { 200 | "name": "Felix Becker", 201 | "email": "felix.b@outlook.com" 202 | } 203 | ], 204 | "description": "PHP classes for the Language Server Protocol", 205 | "keywords": [ 206 | "language", 207 | "microsoft", 208 | "php", 209 | "server" 210 | ], 211 | "time": "2018-09-25T11:42:25+00:00" 212 | }, 213 | { 214 | "name": "jetbrains/phpstorm-stubs", 215 | "version": "dev-master", 216 | "source": { 217 | "type": "git", 218 | "url": "https://github.com/JetBrains/phpstorm-stubs.git", 219 | "reference": "a9e42cb008fa037dee6a4a9eda5296d2436c2ea4" 220 | }, 221 | "dist": { 222 | "type": "zip", 223 | "url": "https://api.github.com/repos/JetBrains/phpstorm-stubs/zipball/a9e42cb008fa037dee6a4a9eda5296d2436c2ea4", 224 | "reference": "a9e42cb008fa037dee6a4a9eda5296d2436c2ea4", 225 | "shasum": "" 226 | }, 227 | "require-dev": { 228 | "nikic/php-parser": "v4.0.1", 229 | "phpdocumentor/reflection-docblock": "^4.3", 230 | "phpunit/phpunit": "7.1.4" 231 | }, 232 | "type": "library", 233 | "notification-url": "https://packagist.org/downloads/", 234 | "license": [ 235 | "Apache-2.0" 236 | ], 237 | "description": "PHP runtime & extensions header files for PhpStorm", 238 | "homepage": "https://www.jetbrains.com/phpstorm", 239 | "keywords": [ 240 | "autocomplete", 241 | "code", 242 | "inference", 243 | "inspection", 244 | "jetbrains", 245 | "phpstorm", 246 | "stubs", 247 | "type" 248 | ], 249 | "time": "2018-11-13T11:32:33+00:00" 250 | }, 251 | { 252 | "name": "microsoft/tolerant-php-parser", 253 | "version": "v0.0.15", 254 | "source": { 255 | "type": "git", 256 | "url": "https://github.com/Microsoft/tolerant-php-parser.git", 257 | "reference": "54a84f1250dcde5641e86b5e966fec5f0e201f71" 258 | }, 259 | "dist": { 260 | "type": "zip", 261 | "url": "https://api.github.com/repos/Microsoft/tolerant-php-parser/zipball/54a84f1250dcde5641e86b5e966fec5f0e201f71", 262 | "reference": "54a84f1250dcde5641e86b5e966fec5f0e201f71", 263 | "shasum": "" 264 | }, 265 | "require": { 266 | "php": ">=7.0" 267 | }, 268 | "require-dev": { 269 | "phpunit/phpunit": "^6.4" 270 | }, 271 | "type": "library", 272 | "autoload": { 273 | "psr-4": { 274 | "Microsoft\\PhpParser\\": [ 275 | "src/" 276 | ] 277 | } 278 | }, 279 | "notification-url": "https://packagist.org/downloads/", 280 | "license": [ 281 | "MIT" 282 | ], 283 | "authors": [ 284 | { 285 | "name": "Rob Lourens", 286 | "email": "roblou@microsoft.com" 287 | } 288 | ], 289 | "description": "Tolerant PHP-to-AST parser designed for IDE usage scenarios", 290 | "time": "2018-09-26T05:43:26+00:00" 291 | }, 292 | { 293 | "name": "netresearch/jsonmapper", 294 | "version": "v1.4.0", 295 | "source": { 296 | "type": "git", 297 | "url": "https://github.com/cweiske/jsonmapper.git", 298 | "reference": "3868fe1128ce1169228acdb623359dca74db5ef3" 299 | }, 300 | "dist": { 301 | "type": "zip", 302 | "url": "https://api.github.com/repos/cweiske/jsonmapper/zipball/3868fe1128ce1169228acdb623359dca74db5ef3", 303 | "reference": "3868fe1128ce1169228acdb623359dca74db5ef3", 304 | "shasum": "" 305 | }, 306 | "require": { 307 | "php": ">=5.6" 308 | }, 309 | "require-dev": { 310 | "phpunit/phpunit": "~4.8.35 || ~5.7 || ~6.4", 311 | "squizlabs/php_codesniffer": "~1.5" 312 | }, 313 | "type": "library", 314 | "autoload": { 315 | "psr-0": { 316 | "JsonMapper": "src/" 317 | } 318 | }, 319 | "notification-url": "https://packagist.org/downloads/", 320 | "license": [ 321 | "OSL-3.0" 322 | ], 323 | "authors": [ 324 | { 325 | "name": "Christian Weiske", 326 | "email": "cweiske@cweiske.de", 327 | "homepage": "http://github.com/cweiske/jsonmapper/", 328 | "role": "Developer" 329 | } 330 | ], 331 | "description": "Map nested JSON structures onto PHP classes", 332 | "time": "2017-11-28T21:30:01+00:00" 333 | }, 334 | { 335 | "name": "phpdocumentor/reflection-common", 336 | "version": "1.0.1", 337 | "source": { 338 | "type": "git", 339 | "url": "https://github.com/phpDocumentor/ReflectionCommon.git", 340 | "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" 341 | }, 342 | "dist": { 343 | "type": "zip", 344 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", 345 | "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", 346 | "shasum": "" 347 | }, 348 | "require": { 349 | "php": ">=5.5" 350 | }, 351 | "require-dev": { 352 | "phpunit/phpunit": "^4.6" 353 | }, 354 | "type": "library", 355 | "extra": { 356 | "branch-alias": { 357 | "dev-master": "1.0.x-dev" 358 | } 359 | }, 360 | "autoload": { 361 | "psr-4": { 362 | "phpDocumentor\\Reflection\\": [ 363 | "src" 364 | ] 365 | } 366 | }, 367 | "notification-url": "https://packagist.org/downloads/", 368 | "license": [ 369 | "MIT" 370 | ], 371 | "authors": [ 372 | { 373 | "name": "Jaap van Otterdijk", 374 | "email": "opensource@ijaap.nl" 375 | } 376 | ], 377 | "description": "Common reflection classes used by phpdocumentor to reflect the code structure", 378 | "homepage": "http://www.phpdoc.org", 379 | "keywords": [ 380 | "FQSEN", 381 | "phpDocumentor", 382 | "phpdoc", 383 | "reflection", 384 | "static analysis" 385 | ], 386 | "time": "2017-09-11T18:02:19+00:00" 387 | }, 388 | { 389 | "name": "phpdocumentor/reflection-docblock", 390 | "version": "4.3.0", 391 | "source": { 392 | "type": "git", 393 | "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", 394 | "reference": "94fd0001232e47129dd3504189fa1c7225010d08" 395 | }, 396 | "dist": { 397 | "type": "zip", 398 | "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/94fd0001232e47129dd3504189fa1c7225010d08", 399 | "reference": "94fd0001232e47129dd3504189fa1c7225010d08", 400 | "shasum": "" 401 | }, 402 | "require": { 403 | "php": "^7.0", 404 | "phpdocumentor/reflection-common": "^1.0.0", 405 | "phpdocumentor/type-resolver": "^0.4.0", 406 | "webmozart/assert": "^1.0" 407 | }, 408 | "require-dev": { 409 | "doctrine/instantiator": "~1.0.5", 410 | "mockery/mockery": "^1.0", 411 | "phpunit/phpunit": "^6.4" 412 | }, 413 | "type": "library", 414 | "extra": { 415 | "branch-alias": { 416 | "dev-master": "4.x-dev" 417 | } 418 | }, 419 | "autoload": { 420 | "psr-4": { 421 | "phpDocumentor\\Reflection\\": [ 422 | "src/" 423 | ] 424 | } 425 | }, 426 | "notification-url": "https://packagist.org/downloads/", 427 | "license": [ 428 | "MIT" 429 | ], 430 | "authors": [ 431 | { 432 | "name": "Mike van Riel", 433 | "email": "me@mikevanriel.com" 434 | } 435 | ], 436 | "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", 437 | "time": "2017-11-30T07:14:17+00:00" 438 | }, 439 | { 440 | "name": "phpdocumentor/type-resolver", 441 | "version": "0.4.0", 442 | "source": { 443 | "type": "git", 444 | "url": "https://github.com/phpDocumentor/TypeResolver.git", 445 | "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7" 446 | }, 447 | "dist": { 448 | "type": "zip", 449 | "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/9c977708995954784726e25d0cd1dddf4e65b0f7", 450 | "reference": "9c977708995954784726e25d0cd1dddf4e65b0f7", 451 | "shasum": "" 452 | }, 453 | "require": { 454 | "php": "^5.5 || ^7.0", 455 | "phpdocumentor/reflection-common": "^1.0" 456 | }, 457 | "require-dev": { 458 | "mockery/mockery": "^0.9.4", 459 | "phpunit/phpunit": "^5.2||^4.8.24" 460 | }, 461 | "type": "library", 462 | "extra": { 463 | "branch-alias": { 464 | "dev-master": "1.0.x-dev" 465 | } 466 | }, 467 | "autoload": { 468 | "psr-4": { 469 | "phpDocumentor\\Reflection\\": [ 470 | "src/" 471 | ] 472 | } 473 | }, 474 | "notification-url": "https://packagist.org/downloads/", 475 | "license": [ 476 | "MIT" 477 | ], 478 | "authors": [ 479 | { 480 | "name": "Mike van Riel", 481 | "email": "me@mikevanriel.com" 482 | } 483 | ], 484 | "time": "2017-07-14T14:27:02+00:00" 485 | }, 486 | { 487 | "name": "psr/log", 488 | "version": "1.0.2", 489 | "source": { 490 | "type": "git", 491 | "url": "https://github.com/php-fig/log.git", 492 | "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" 493 | }, 494 | "dist": { 495 | "type": "zip", 496 | "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", 497 | "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", 498 | "shasum": "" 499 | }, 500 | "require": { 501 | "php": ">=5.3.0" 502 | }, 503 | "type": "library", 504 | "extra": { 505 | "branch-alias": { 506 | "dev-master": "1.0.x-dev" 507 | } 508 | }, 509 | "autoload": { 510 | "psr-4": { 511 | "Psr\\Log\\": "Psr/Log/" 512 | } 513 | }, 514 | "notification-url": "https://packagist.org/downloads/", 515 | "license": [ 516 | "MIT" 517 | ], 518 | "authors": [ 519 | { 520 | "name": "PHP-FIG", 521 | "homepage": "http://www.php-fig.org/" 522 | } 523 | ], 524 | "description": "Common interface for logging libraries", 525 | "homepage": "https://github.com/php-fig/log", 526 | "keywords": [ 527 | "log", 528 | "psr", 529 | "psr-3" 530 | ], 531 | "time": "2016-10-10T12:19:37+00:00" 532 | }, 533 | { 534 | "name": "sabre/event", 535 | "version": "5.0.3", 536 | "source": { 537 | "type": "git", 538 | "url": "https://github.com/sabre-io/event.git", 539 | "reference": "f5cf802d240df1257866d8813282b98aee3bc548" 540 | }, 541 | "dist": { 542 | "type": "zip", 543 | "url": "https://api.github.com/repos/sabre-io/event/zipball/f5cf802d240df1257866d8813282b98aee3bc548", 544 | "reference": "f5cf802d240df1257866d8813282b98aee3bc548", 545 | "shasum": "" 546 | }, 547 | "require": { 548 | "php": ">=7.0" 549 | }, 550 | "require-dev": { 551 | "phpunit/phpunit": ">=6", 552 | "sabre/cs": "~1.0.0" 553 | }, 554 | "type": "library", 555 | "autoload": { 556 | "psr-4": { 557 | "Sabre\\Event\\": "lib/" 558 | }, 559 | "files": [ 560 | "lib/coroutine.php", 561 | "lib/Loop/functions.php", 562 | "lib/Promise/functions.php" 563 | ] 564 | }, 565 | "notification-url": "https://packagist.org/downloads/", 566 | "license": [ 567 | "BSD-3-Clause" 568 | ], 569 | "authors": [ 570 | { 571 | "name": "Evert Pot", 572 | "email": "me@evertpot.com", 573 | "homepage": "http://evertpot.com/", 574 | "role": "Developer" 575 | } 576 | ], 577 | "description": "sabre/event is a library for lightweight event-based programming", 578 | "homepage": "http://sabre.io/event/", 579 | "keywords": [ 580 | "EventEmitter", 581 | "async", 582 | "coroutine", 583 | "eventloop", 584 | "events", 585 | "hooks", 586 | "plugin", 587 | "promise", 588 | "reactor", 589 | "signal" 590 | ], 591 | "time": "2018-03-05T13:55:47+00:00" 592 | }, 593 | { 594 | "name": "sabre/uri", 595 | "version": "2.1.1", 596 | "source": { 597 | "type": "git", 598 | "url": "https://github.com/sabre-io/uri.git", 599 | "reference": "a42126042c7dcb53e2978dadb6d22574d1359b4c" 600 | }, 601 | "dist": { 602 | "type": "zip", 603 | "url": "https://api.github.com/repos/sabre-io/uri/zipball/a42126042c7dcb53e2978dadb6d22574d1359b4c", 604 | "reference": "a42126042c7dcb53e2978dadb6d22574d1359b4c", 605 | "shasum": "" 606 | }, 607 | "require": { 608 | "php": ">=7" 609 | }, 610 | "require-dev": { 611 | "phpunit/phpunit": "^6.0", 612 | "sabre/cs": "~1.0.0" 613 | }, 614 | "type": "library", 615 | "autoload": { 616 | "files": [ 617 | "lib/functions.php" 618 | ], 619 | "psr-4": { 620 | "Sabre\\Uri\\": "lib/" 621 | } 622 | }, 623 | "notification-url": "https://packagist.org/downloads/", 624 | "license": [ 625 | "BSD-3-Clause" 626 | ], 627 | "authors": [ 628 | { 629 | "name": "Evert Pot", 630 | "email": "me@evertpot.com", 631 | "homepage": "http://evertpot.com/", 632 | "role": "Developer" 633 | } 634 | ], 635 | "description": "Functions for making sense out of URIs.", 636 | "homepage": "http://sabre.io/uri/", 637 | "keywords": [ 638 | "rfc3986", 639 | "uri", 640 | "url" 641 | ], 642 | "time": "2017-02-20T20:02:35+00:00" 643 | }, 644 | { 645 | "name": "webmozart/assert", 646 | "version": "1.3.0", 647 | "source": { 648 | "type": "git", 649 | "url": "https://github.com/webmozart/assert.git", 650 | "reference": "0df1908962e7a3071564e857d86874dad1ef204a" 651 | }, 652 | "dist": { 653 | "type": "zip", 654 | "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", 655 | "reference": "0df1908962e7a3071564e857d86874dad1ef204a", 656 | "shasum": "" 657 | }, 658 | "require": { 659 | "php": "^5.3.3 || ^7.0" 660 | }, 661 | "require-dev": { 662 | "phpunit/phpunit": "^4.6", 663 | "sebastian/version": "^1.0.1" 664 | }, 665 | "type": "library", 666 | "extra": { 667 | "branch-alias": { 668 | "dev-master": "1.3-dev" 669 | } 670 | }, 671 | "autoload": { 672 | "psr-4": { 673 | "Webmozart\\Assert\\": "src/" 674 | } 675 | }, 676 | "notification-url": "https://packagist.org/downloads/", 677 | "license": [ 678 | "MIT" 679 | ], 680 | "authors": [ 681 | { 682 | "name": "Bernhard Schussek", 683 | "email": "bschussek@gmail.com" 684 | } 685 | ], 686 | "description": "Assertions to validate method input/output with nice error messages.", 687 | "keywords": [ 688 | "assert", 689 | "check", 690 | "validate" 691 | ], 692 | "time": "2018-01-29T19:49:41+00:00" 693 | }, 694 | { 695 | "name": "webmozart/glob", 696 | "version": "4.1.0", 697 | "source": { 698 | "type": "git", 699 | "url": "https://github.com/webmozart/glob.git", 700 | "reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe" 701 | }, 702 | "dist": { 703 | "type": "zip", 704 | "url": "https://api.github.com/repos/webmozart/glob/zipball/3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe", 705 | "reference": "3cbf63d4973cf9d780b93d2da8eec7e4a9e63bbe", 706 | "shasum": "" 707 | }, 708 | "require": { 709 | "php": "^5.3.3|^7.0", 710 | "webmozart/path-util": "^2.2" 711 | }, 712 | "require-dev": { 713 | "phpunit/phpunit": "^4.6", 714 | "sebastian/version": "^1.0.1", 715 | "symfony/filesystem": "^2.5" 716 | }, 717 | "type": "library", 718 | "extra": { 719 | "branch-alias": { 720 | "dev-master": "4.1-dev" 721 | } 722 | }, 723 | "autoload": { 724 | "psr-4": { 725 | "Webmozart\\Glob\\": "src/" 726 | } 727 | }, 728 | "notification-url": "https://packagist.org/downloads/", 729 | "license": [ 730 | "MIT" 731 | ], 732 | "authors": [ 733 | { 734 | "name": "Bernhard Schussek", 735 | "email": "bschussek@gmail.com" 736 | } 737 | ], 738 | "description": "A PHP implementation of Ant's glob.", 739 | "time": "2015-12-29T11:14:33+00:00" 740 | }, 741 | { 742 | "name": "webmozart/path-util", 743 | "version": "2.3.0", 744 | "source": { 745 | "type": "git", 746 | "url": "https://github.com/webmozart/path-util.git", 747 | "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725" 748 | }, 749 | "dist": { 750 | "type": "zip", 751 | "url": "https://api.github.com/repos/webmozart/path-util/zipball/d939f7edc24c9a1bb9c0dee5cb05d8e859490725", 752 | "reference": "d939f7edc24c9a1bb9c0dee5cb05d8e859490725", 753 | "shasum": "" 754 | }, 755 | "require": { 756 | "php": ">=5.3.3", 757 | "webmozart/assert": "~1.0" 758 | }, 759 | "require-dev": { 760 | "phpunit/phpunit": "^4.6", 761 | "sebastian/version": "^1.0.1" 762 | }, 763 | "type": "library", 764 | "extra": { 765 | "branch-alias": { 766 | "dev-master": "2.3-dev" 767 | } 768 | }, 769 | "autoload": { 770 | "psr-4": { 771 | "Webmozart\\PathUtil\\": "src/" 772 | } 773 | }, 774 | "notification-url": "https://packagist.org/downloads/", 775 | "license": [ 776 | "MIT" 777 | ], 778 | "authors": [ 779 | { 780 | "name": "Bernhard Schussek", 781 | "email": "bschussek@gmail.com" 782 | } 783 | ], 784 | "description": "A robust cross-platform utility for normalizing, comparing and modifying file paths.", 785 | "time": "2015-12-17T08:42:14+00:00" 786 | } 787 | ], 788 | "packages-dev": [], 789 | "aliases": [], 790 | "minimum-stability": "dev", 791 | "stability-flags": [], 792 | "prefer-stable": true, 793 | "prefer-lowest": false, 794 | "platform": [], 795 | "platform-dev": [], 796 | "platform-overrides": { 797 | "php": "7.0" 798 | } 799 | } 800 | -------------------------------------------------------------------------------- /lib/main.js: -------------------------------------------------------------------------------- 1 | const cp = require('child_process') 2 | const fs = require('fs') 3 | const net = require('net') 4 | const path = require('path') 5 | const {shell} = require('electron') 6 | const {AutoLanguageClient, DownloadFile} = require('atom-languageclient') 7 | 8 | const serverDownloadUrl = 'https://github.com/atom/ide-php/files/2580711/php-ls-5.4.6.tar.gz' 9 | const serverDownloadSize = 3056441 10 | const serverLauncher = path.join('felixfbecker', 'language-server', 'bin', 'php-language-server.php') 11 | const minPHPRuntime = '7.0' 12 | const bytesToMegabytes = 1024 * 1024 13 | 14 | class PHPLanguageClient extends AutoLanguageClient { 15 | getGrammarScopes () { return [ 'text.html.php' ] } 16 | getLanguageName () { return 'PHP' } 17 | getServerName () { return 'FelixFBecker' } 18 | 19 | provideAutocomplete() { 20 | const provide = super.provideAutocomplete() 21 | provide.inclusionPriority = atom.config.get('ide-php.autocompletePriority') === 'lower' ? 2 : 1 22 | provide.suggestionPriority = atom.config.get('ide-php.autocompletePriority') === 'lower' ? 1 : 2 23 | return provide 24 | } 25 | 26 | onDidConvertAutocomplete(completionItem, suggestion, request) { 27 | if (/<[a-z][\s\S]*>/i.test(suggestion.description)) { 28 | suggestion.descriptionMarkdown = suggestion.description.replace(/\n/g, ''); 29 | } 30 | } 31 | 32 | startServerProcess () { 33 | const serverHome = path.join(__dirname, '..', 'vendor') 34 | return this.getOrInstallServer(serverHome).then(() => 35 | this.getConnectionType() === 'socket' ? this.spawnServerWithSocket() : this.spawnServer() 36 | ) 37 | } 38 | 39 | spawnServerWithSocket () { 40 | return new Promise((resolve, reject) => { 41 | let childProcess 42 | const server = net.createServer(socket => { 43 | // When the language server connects, grab socket, stop listening and resolve 44 | this.socket = socket 45 | server.close() 46 | resolve(childProcess) 47 | }) 48 | server.listen(0, '127.0.0.1', () => { 49 | // Once we have a port assigned spawn the Language Server with the port 50 | childProcess = this.spawnServer([`--tcp=127.0.0.1:${server.address().port}`]) 51 | }) 52 | }) 53 | } 54 | 55 | checkPHPVersion (command) { 56 | return new Promise((resolve, reject) => { 57 | const childProcess = cp.spawn(command, [ '-r', 'echo phpversion();' ]) 58 | var alreadyShownError = false 59 | childProcess.on('error', err => { 60 | alreadyShownError = true 61 | let description = err.code == 'ENOENT' 62 | ? `No PHP interpreter found at ${command}.` 63 | : `Could not spawn the PHP interpreter ${command}.` 64 | atom.notifications.addError('IDE-PHP could not launch your PHP runtime.', { 65 | dismissable: true, 66 | buttons: [ 67 | { text: 'Set PHP Path', onDidClick: () => this.openPackageSettings() }, 68 | { text: 'Download PHP', onDidClick: () => this.downloadPHP() }, 69 | ], 70 | description: `${description}
If you have PHP ${minPHPRuntime} installed please Set PHP Path correctly. If you do not please Download PHP ${minPHPRuntime} or later and install it.
${err.message}
`
71 | })
72 | reject()
73 | })
74 | let stdErr = '', stdOut = ''
75 | childProcess.stderr.on('data', chunk => stdErr += chunk.toString())
76 | childProcess.stdout.on('data', chunk => stdOut += chunk.toString())
77 | childProcess.on('close', exitCode => {
78 | if (alreadyShownError) return
79 | if (exitCode === 0 && stdOut != '') {
80 | this.logger.debug(`Using PHP ${stdOut} from ${command}`)
81 | if (this.meetsRequiredVersion(stdOut, minPHPRuntime)) {
82 | resolve()
83 | } else {
84 | atom.notifications.addError(`IDE-PHP requires PHP ${minPHPRuntime} or later but found ${stdOut}`, {
85 | dismissable: true,
86 | buttons: [
87 | { text: 'Set PHP Path', onDidClick: () => this.openPackageSettings() },
88 | { text: 'Download PHP', onDidClick: () => this.downloadPHP() },
89 | ],
90 | description: `If you have PHP ${minPHPRuntime} installed please Set PHP Path correctly. If you do not please Download PHP ${minPHPRuntime} or later and install it.`
91 | })
92 | reject()
93 | }
94 | } else {
95 | atom.notifications.addError('IDE-PHP encounted an error using the PHP runtime.', {
96 | dismissable: true,
97 | description: stdErr != '' ? `${stdErr}
` : `Exit code ${exitCode}`
98 | })
99 | reject()
100 | }
101 | })
102 | })
103 | }
104 |
105 | meetsRequiredVersion (versionString, requiredString) {
106 | var version = versionString.split('.')
107 | var required = requiredString.split('.')
108 |
109 | for (var i = 0; i < required.length; i++) {
110 | if (i >= version.length) return false
111 |
112 | var versionPoint = parseInt(version[i])
113 | var requiredPoint = parseInt(required[i])
114 |
115 | if (versionPoint < requiredPoint) return false;
116 | if (versionPoint > requiredPoint) return true;
117 | // Otherwise check next part via loop
118 | }
119 |
120 | return true
121 | }
122 |
123 | downloadPHP () {
124 | shell.openExternal('https://secure.php.net/downloads.php')
125 | }
126 |
127 | spawnServer (extraArgs) {
128 | const command = this.getPHPCommand()
129 |
130 | return this.checkPHPVersion(command).then(() => {
131 | const serverHome = path.join(__dirname, '..', 'vendor')
132 |
133 | // Temporarily set the default to 2GB as language server defaults to 4GB which fails on 32-bit systems
134 | const memoryLimit = this.getMemoryLimit() === '-1' ? '2G' : this.getMemoryLimit()
135 | const args = [ serverLauncher, '--memory-limit=' + memoryLimit ]
136 | if (extraArgs) {
137 | args.push(extraArgs)
138 | }
139 |
140 | this.logger.debug(`starting "${command} ${args.join(' ')}"`)
141 | const childProcess = cp.spawn(command, args, { cwd: serverHome })
142 | this.captureServerErrors(childProcess)
143 | childProcess.on('exit', exitCode => {
144 | if (exitCode != 0 && exitCode != null) {
145 | atom.notifications.addError('IDE-PHP language server stopped unexpectedly.', {
146 | dismissable: true,
147 | description: this.processStdErr != null ? `${this.processStdErr}
` : `Exit code ${exitCode}`
148 | })
149 | }
150 | })
151 | return childProcess
152 | })
153 | }
154 |
155 | openPackageSettings() {
156 | atom.workspace.open('atom://config/packages/ide-php')
157 | }
158 |
159 | getOrInstallServer (serverHome) {
160 | return this.fileExists(path.join(serverHome, serverLauncher))
161 | .then(doesExist => { if (!doesExist) return this.installServer(serverHome) })
162 | }
163 |
164 | installServer (serverHome) {
165 | const localFileName = path.join(serverHome, 'download.tar.gz')
166 | const decompress = require('decompress')
167 | const installSignal = this.busySignalService && this.busySignalService.reportBusy('installing...', { revealTooltip: true })
168 | return this.fileExists(serverHome)
169 | .then(doesExist => { if (!doesExist) fs.mkdirSync(serverHome) })
170 | .then(() => DownloadFile(serverDownloadUrl, localFileName, (bytesDone, percent) => installSignal && installSignal.setTitle(`downloading ${Math.floor(serverDownloadSize / bytesToMegabytes)} MB (${percent}% done)`), serverDownloadSize))
171 | .then(() => installSignal && installSignal.setTitle('unpacking...'))
172 | .then(() => decompress(localFileName, serverHome))
173 | .then(() => installSignal && installSignal.dispose())
174 | .then(() => this.fileExists(path.join(serverHome, serverLauncher)))
175 | .then(doesExist => { if (!doesExist) throw Error(`Failed to install the ${this.getServerName()} language server`) })
176 | .then(() => fs.unlinkSync(localFileName))
177 | .catch(() => new Error(`Failed to install the ${this.getServerName()} language server`))
178 |
179 | }
180 |
181 | getPHPCommand () {
182 | const configuredPath = atom.config.get('ide-php.phpPath')
183 | if (configuredPath != null && configuredPath != '') {
184 | return configuredPath
185 | }
186 |
187 | const phpHome = process.env['PHP_HOME']
188 | if (phpHome != null && phpHome != '') {
189 | return path.join(phpHome, 'php')
190 | }
191 |
192 | return 'php'
193 | }
194 |
195 | getMemoryLimit () {
196 | const memoryLimit = atom.config.get('ide-php.memoryLimit') || '-1'
197 |
198 | if (memoryLimit != '-1' && !/^\d+[KMG]?$/.test(memoryLimit)) {
199 | atom.notifications.addError(`Invalid memory limit setting of ${memoryLimit}`, {
200 | dismissable: true,
201 | buttons: [ { text: 'Set Memory Limit', onDidClick: () => this.openPackageSettings() } ],
202 | description: 'The memory limit setting should be set to -1, a numeric value or PHP shorthand notation such as 100M, 2G.'
203 | })
204 | return '-1'
205 | }
206 |
207 | return memoryLimit;
208 | }
209 |
210 | getConnectionType() {
211 | const configConnectionType = atom.config.get('ide-php.connectionType')
212 | switch (configConnectionType) {
213 | case 'auto': return process.platform === 'win32' ? 'socket' : 'stdio';
214 | case 'socket': return 'socket';
215 | case 'stdio': return 'stdio';
216 | default:
217 | atom.notifications.addWarning('Invalid connection type setting', {
218 | dismissable: true,
219 | buttons: [ { text: 'Set Connection Type', onDidClick: () => this.openPackageSettings() } ],
220 | description: 'The connection type setting should be set to "auto", "socket" or "stdio". "auto" is "socket" on Windows and "stdio" on other platforms.'
221 | })
222 | }
223 | }
224 |
225 | fileExists (path) {
226 | return new Promise((resolve, reject) => {
227 | fs.access(path, fs.R_OK, error => {
228 | resolve(!error || error.code !== 'ENOENT')
229 | })
230 | })
231 | }
232 |
233 | deleteFileIfExists (path) {
234 | return new Promise((resolve, reject) => {
235 | fs.unlink(path, error => {
236 | if (error && error.code !== 'ENOENT') { reject(error) } else { resolve() }
237 | })
238 | })
239 | }
240 | }
241 |
242 | module.exports = new PHPLanguageClient()
243 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ide-php",
3 | "main": "./lib/main",
4 | "version": "0.7.18",
5 | "description": "PHP language support for Atom-IDE",
6 | "repository": "https://github.com/atom/ide-php",
7 | "license": "MIT",
8 | "engines": {
9 | "atom": ">=1.21.0"
10 | },
11 | "configSchema": {
12 | "phpPath": {
13 | "title": "PHP Path",
14 | "type": "string",
15 | "default": "",
16 | "description": "Absolute path of your PHP 7 binary (e.g. `/usr/local/bin/php` or `c:\\php7\\php.exe`) if not in PATH or PHP_HOME. This is used to launch the PHP language server."
17 | },
18 | "memoryLimit": {
19 | "title": "Memory Limit",
20 | "type": "string",
21 | "default": "-1",
22 | "description": "Maximum amount of memory the local PHP language server can use. [Number][K|M|G]. Use '-1' to allow unlimited RAM use."
23 | },
24 | "connectionType": {
25 | "title": "Connection Type",
26 | "type": "string",
27 | "enum": [
28 | "auto",
29 | "socket",
30 | "stdio"
31 | ],
32 | "default": "auto",
33 | "description": "The connection type for communicating with the local PHP language server. 'auto' will use 'socket' on Windows, 'stdio' on other platforms."
34 | },
35 | "autocompletePriority": {
36 | "title": "AutoComplete suggestion pritority",
37 | "type": "string",
38 | "enum": [
39 | "default",
40 | "lower"
41 | ],
42 | "default": "default",
43 | "description": "Set 'lower' if you want to see LSP suggestions under the suggestions from the Autocomplete package. Restart required."
44 | }
45 | },
46 | "scripts": {
47 | "server-install": "rm -rf vendor && rm -rf composer.lock && composer install --prefer-dist --no-dev && composer dump-autoload --optimize",
48 | "server-package": "7z a temp.tar ./vendor/* && 7z a php-ls-x.y.z.tar.gz temp.tar && rm -f temp.tar"
49 | },
50 | "atomTestRunner": "./test/runner",
51 | "dependencies": {
52 | "atom-languageclient": "0.9.9",
53 | "decompress": "^4.2.0"
54 | },
55 | "enhancedScopes": [
56 | "text.html.php"
57 | ],
58 | "consumedServices": {
59 | "linter-indie": {
60 | "versions": {
61 | "2.0.0": "consumeLinterV2"
62 | }
63 | },
64 | "atom-ide-busy-signal": {
65 | "versions": {
66 | "0.1.0": "consumeBusySignal"
67 | }
68 | },
69 | "datatip": {
70 | "versions": {
71 | "0.1.0": "consumeDatatip"
72 | }
73 | },
74 | "signature-help": {
75 | "versions": {
76 | "0.1.0": "consumeSignatureHelp"
77 | }
78 | }
79 | },
80 | "providedServices": {
81 | "autocomplete.provider": {
82 | "versions": {
83 | "4.0.0": "provideAutocomplete"
84 | }
85 | },
86 | "code-format.range": {
87 | "versions": {
88 | "0.1.0": "provideCodeFormat"
89 | }
90 | },
91 | "code-highlight": {
92 | "versions": {
93 | "0.1.0": "provideCodeHighlight"
94 | }
95 | },
96 | "definitions": {
97 | "versions": {
98 | "0.1.0": "provideDefinitions"
99 | }
100 | },
101 | "find-references": {
102 | "versions": {
103 | "0.1.0": "provideFindReferences"
104 | }
105 | },
106 | "outline-view": {
107 | "versions": {
108 | "0.1.0": "provideOutlines"
109 | }
110 | }
111 | }
112 | }
113 |
--------------------------------------------------------------------------------