facebookarchive / nuclide

An open IDE for web and native mobile development, built on top of Atom
https://nuclide.io
Other
7.79k stars 683 forks source link

PHP snippets not working in .php files when in hack mode #1042

Open marcbacon opened 7 years ago

marcbacon commented 7 years ago

Issue and Steps to Reproduce

PHP snippets and autocomplete is not working when I am editing .php files when they are opened in hack mode (which is autodetected and opened by default). Switching away from hack mode to php mode fixes this issue. Unfortunately, all .php files are automatically opened in hack mode.

Expected Behavior

PHP snippets should work.

Actual Behavior

PHP snippets do not work in hack mode.

Versions

Additional Details

This happens even when I disable all other packages.

johnislarry commented 7 years ago

Are you editing this PHP code locally or remotely on a server? Do you have hack and HHVM installed?

marcbacon commented 7 years ago

Locally. Do I need to have hack and HHVM installed on my local machine? I am not running these files locally.

johnislarry commented 7 years ago

Nuclide's autocomplete is powered by Hack. You can install it with brew install hhvm and it should work

marcbacon commented 7 years ago

I did this and it seems that HHVM has installed correctly, but autocomplete is still not working. I have restarted atom.

mediaxtend commented 7 years ago

I got the same problem. I don't want to use Hack for my PHP files but I need Nuclide for my React/React Native developments. Is it possible to add an option in the config to disable Hack grammar for some file extensions (.php for example)? Doing this will help Atom to fallback to other packages (linter, autocomplete… that were working perfectly before the Nuclide install) when editing PHP files.