[Workaround] Nuclide should identify PHP files as php not hack


Nuclide is incorrectly identifying and providing hack syntax highlighting for my PHP files.

I do not use hack at present.

I can manually change the language type but this is annoying.

How do I fix this?


You can override Atom’s language recognition with a config.cson entry.


Cool - thanks! :slight_smile:

I tried making the correct? entry but Nuclide seems to be still insisting that my php is hack.

I understand the fact that php is generally legal hack but identifying a xxxxxx.php file as hack is incorrect.


Please screenshot your config.cson and post that.

The language-hack package is telling Atom that php is one of its file extensions. If that’s incorrect, you should submit an issue at the package repo to get it changed.


Apoligies - seems I did not correctly make the config.cson change -

following IS working for me:

         --snip --
          "text.html.php": [
          "source.python": [
        disabledPackages: [

Thanks for your help!


For future reference, you should fence CSON in code tags to preserve the indentation, or post a screenshot of the file. We can’t accurately diagnose issues if we can’t see the indentation.


Done above for future readers…