PHP Syntax Colors

Hello to all the atom community

I’m an atom newbie and I’ll use it for PHP

I’m wondering if it is expected what in the screenshot


as you see for
$this->name = $name;

the color is RED for all the words

Is that normal?
Is there some enhanced PHP coloring for the various keywords?
Is there some package for this?

Thank you

No, the color red is used for all variables.

Since you haven’t specified what you think the expected behaviour is, I’m going to assume that you would prefer some distinction, e.g. between (class) properties and normal variables. Yes, it’s possible, since the default PHP language package offers that distinction. However, not all syntax themes are that fine-grained.

What you need to do is find a syntax theme that is optimized for PHP. A good starting point is probably searching for “PHP” on the themes page.



Well :slight_smile:
how do I enable the " default PHP language package" you mention?

Also, there is another behavior, I have installed PHP-IDE plugin/package

I type $th.. it does hint for $this-> but when I press either TAB or Enter

It only inserts $this missing the dash and the major symbols


Can you kindly hint on what is wrong?

Thank you

This is what happen after pressing TAB or Enter


as you can see the dash and the > are missing

It’s bundled with Atom and, unless another package interferes, it’s the default syntax highlighter.

I cannot, since I don’t use Atom for coding PHP. However, since Atom can’t predict your behaviour, e.g. whether you want just $this or $this->that, I guess that’s the default.

Maybe have a look at tabnine, it’s an AI-powered completion package and pretty good at predicting what you want to type.


looks like it’s better to uninstall atom and start over with a new fresh installation

Just for the sake of curiosity

without any extra setting or plugin/extension/package

this is Eclipse last version, installed right now for testing

someone working with PHP … knows what to offer to his users


Again, Atom can do this, but the theme you are currently using doesn’t support what you’re looking for. There are 2500+ syntax themes to choose from, I’m sure there are several that suit your needs. I’d start by looking whether your Eclipse theme is also available for Atom.

Hello idleberg thank you for your kind replies.

My one is just an observation

Inside atom team, those specialists of the respective languages, should consider the need of that language coders

Maybe here on the forum, make some pinned posts with this kind of titles:

“atom for PHP - suggested packages”
“atom for java - suggested packages”

and so on

and inside the post they would/could explain peculiarities for that particular language that atom provides out of the box , install and play without extension

useful for better spreading the atom program

The problem is what you already admit with your words “there are thousands syntax themes to choose from”

and you think someone will invest so much time in testing all of them?

Nowadays are slightly frenetic, a percentage of people that land on atom, may give up with it for this reason.

On the other hand maybe atom is primarily intended for other languages , but out there is said that PHP is one of the most popular languages…

… so again having in mind the idea to have more supporters , I think is slightly no-strategic to don’t think to provide some proframming languages setting section

you go there , you choose your coding language and a preset from the atom mother house with enhancements specific for that language , will apply

Just my supposition and suggestion

That scenario is otherwise called a “profile repository” which unfortunately Atom does not yet offer. For my own development workflow (which includes PHP and other languages I explore) I am thinking through how such profiles (sets of packages/themes) might be implemented - but I will not place it in a package. For example I have just jettisoned project-viewer and replaced with external file manager (Krusader in Ubuntu) to provide cleaner project viewing by opening Krusader folders/files in Atom. Next I am writing a python script which will orchestrate Atom for different profiles (such as PHP). It would be interesting to poll a list of profiles required by the community. Then the thousands of themes might be narrowed down to perhaps a few dozen or so.

P.S. Laravel theme suggestions.

Hi d_l thank you

nice link :slight_smile: thank you

going back to colors in classes (see above screenshots) do you know if any/which one emulates the one of eclipse screenshot?

Thank you

Perhaps this theme might be used in Atom

Just one casual search.

[Further thought]
picking some of the PHP themes such as zenburn (for example)

go to

to see if Atom has same theme package.

This should narrow down the options to try.


Thank you for the links, only the first one looks you saved it without the query …

I had a blip in my browser. Had to reboot.

Here is the source of many themes.

now it works but “after half an hour I realized immediately” that this is an eclipse themes dedicated website … so this confuses me …

how do I use them in atom?

Is there a sort of compatibility?

It was admittedly a wild idea to hack your own custom theme by converting the downloaded eclipse theme xml data.

[Later edit]
Expanding on this general idea I have read here that TextMate bundles can be ported to Atom to create custom theme. If php.tmbundle resembles Eclipse theme perhaps this might be another approach to try.

Also when browsing around I found this Atom theme gallery. If you search in this site “PHP” (using browser find to search through browser source) there are 22 themes found. There is also one Phpeclipse-syntax theme found.