Home

Awesome

Hack for Visual Studio Code

This extension adds rich Hack language & HHVM support to Visual Studio Code. Visit http://hacklang.org to get started with Hack.

It is published in the Visual Studio Marketplace here. To install, search for "Hack" in the VS Code extensions tab or run the following command (⌘+P): ext install vscode-hack.

Latest releases

v2.9.0

v2.8.0

v2.7.0

See the full list of releases and features added on the Github releases page as well as the project changelog.

Features

Hack for Visual Studio Code

Requirements

This extension is supported on Linux and Mac OS X 10.10 onwards (see HHVM compatibility). The latest versions of Hack typechecking tools (hh_client and hh_server) are required on the local machine or via a remote connection. The workspace should have a .hhconfig file at its root.

Configuration

This extension adds the following Visual Studio Code settings. These can be set in user preferences (⌘+,) or workspace settings (.vscode/settings.json).

Remote Development

The extension supports connecting to an external HHVM development environment for local typechecking, linting and all other intellisense features. The current supported connection methods are SSH into a remote host or exec in a local Docker container.

To enable this, set the following config values:

For SSH:

Make sure to test SSH connectivity and credentials beforehand. You should also ensure that the source stays in sync between the local and remote machines (the extension doesn't currently handle this).

$ ssh user@my-remote-host.com "cd /mnt/project && hh_client"
No errors!

For Docker:

Make sure the container is already running on your local machine, and has the required HHVM setup. You can pull an official HHVM image from Docker hub and even run multiple versions simultaneously.

$ docker run -d -t --name my-hhvm -v /home/user/repos/project:/mnt/project hhvm/hhvm:latest
$ docker exec --workdir /mnt/project my-hhvm hh_client
No errors!

Issues

Please file all bugs, issues, feature requests etc. at the GitHub issues page.

Contributing

There are lots of ways to help! You can file new bugs and feature requests, or fix a pending one. To contribute to the source code, fork the repository on GitHub and create a pull request. Please read our Contributors Guide and check out the VS Code extension development guide to get started.

License

The source code for this extension is hosted at https://github.com/slackhq/vscode-hack and is available under the MIT license.