This package was written specifically for Pulsar and did not exist in the Atom package repository.
pulsar-ide-php
An IDE provider package for PHP that uses the Intelephense language server.
Provides autocompletion, go-to-definition, and other useful features out of the box; consider installing some IDE consumer packages to enjoy more features.
Uses its own copy of Intelephense; you do not need to install your own. It runs on Pulsar’s own embedded Node, so there’s nothing else to install and nothing to configure before it will start.
What does this package do?
An “IDE provider package” is a package that knows how to talk to a language server. A language server is a program that can analyze a project written in a specific programming language and act as a “brain” for a bunch of features that would be useful for a code editor.
This package knows how to talk to Intelephense, a PHP language server with a fast indexer and a thorough static analysis engine.
Licence keys and premium features
Intelephense is free to use, but some of its features require a paid licence key. The free feature set is generous — completion, signature help, go-to-definition, find-all-references, symbol search, diagnostics, formatting, and hover are all included, and always will be.
A licence unlocks the rest: renaming symbols across a project, code actions (importing symbols, adding PHPDoc, implementing abstract methods), finding implementations of interfaces and abstract classes, go-to-type-definition, and a few others. You can buy one here.
If you have a key, paste it into the License Key setting under Intelephense. The server will restart automatically to apply it, and will tell you whether the key was accepted.
A few of Intelephense’s premium features — code lens, inlay hints, and document links — have no equivalent in Pulsar yet, so a licence won’t light those up here.
Configuring Intelephense
Most of Intelephense’s own settings live under the Intelephense section of this package’s settings menu, and are grouped roughly the way they are in Intelephense’s documentation: Environment, Files, Completion, Diagnostics, and so on.
Two of these behave slightly differently than they do in other editors:
Additional Excluded Paths (files.exclude) adds to Pulsar’s own Ignored Names setting (core.ignoredNames) rather than replacing it. There’s no need to list .git or .DS_Store here; the default value only mentions the things that are specific to PHP projects, like vendor and node_modules.
License Key is spelled the American way in the settings menu, but is sent to the server as licenceKey. If you’re following Intelephense’s own documentation, they’re the same setting.
Per-project configuration
If a project contains an intelephense.config.json file in its root directory, the settings in that file win over the ones in the settings menu. This is the same file that Intelephense reads in other editors, so a file that’s already checked into a repository will work here without modification.
Its contents may be either a bare settings object or one wrapped in an intelephense key:
Settings are merged one key at a time, so a file like the one above changes only those two values and leaves everything else in the settings menu alone. Lists — like stubs or files.exclude — are replaced rather than combined, on the theory that a project asking for particular stubs means those stubs.
This is also how you reach the handful of settings that aren’t in the settings menu, because they don’t fit well into it: stubs, diagnostics.severity, diagnostics.exclude, and the phpdoc templates.
Edits to this file take effect right away! There’s no need to restart the language server.
What other packages should I install?
This package provides only the “brain” for a bunch of PHP-related features. The actual implementations of those features come from packages — some of which are built into Pulsar and some of which need installation.
Start with these packages; they’re all builtin, actively maintained, and/or built exclusively for Pulsar: