ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Hacklang Typechecker and Autocompletion

by SiebelsTim ST2/ST3

Hack's typechecker & autocompletion inside Sublime Text

Details

Installs

  • Total 2K
  • Win 1K
  • OS X 669
  • Linux 445
Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6 Sep 5 Sep 4 Sep 3
Windows 1 2 3 1 2 0 0 1 2 3 1 2 2 2 1 2 0 4 0 4 3 0 1 2 1 1 0 1 0 3 2 3 0 1 2 3 1 2 3 1 1 0 2 1 0 1
OS X 0 0 2 1 1 0 0 0 0 0 0 0 0 2 1 3 0 0 1 0 1 3 1 0 1 0 0 1 0 2 0 0 1 0 0 3 2 2 0 0 1 4 0 0 0 0
Linux 0 0 1 0 1 0 0 0 2 1 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 3 1 1 0 0 0 0 0 0 0 1 0

Readme

Source
raw.​githubusercontent.​com

Installation

Download the zip-archive and move it into Sublime Text's config folder.

wget https://github.com/SiebelsTim/hack-sublime/raw/master/Hack.sublime-package
mv Hack.sublime-package ~/.config/sublime-text-3/Installed\ Packages/Hack.sublime-package

Change the folder to sublime-text-2 if you use Sublime Text 2

How to use

The typechecker is triggered on saving files. The files need to begin with <?. So both <?php and <?hh will work. The filetype is ignored.

Autocompletion is triggered on your keyboard shortcut. Look it up under Preferences -> Key Bindings and search for auto_complete.

Example

Windows

If you use Windows you can install a virtual machine running linux. This plugin will then log into ssh and run hh_client remotely. You'll have to have your ssh credentials setup so you don't have to enter your password.

This plugin then defines three new settings. - hack_ssh_enable - enables ssh support - hack_ssh_folder - the remote folder to run hh_client on - hack_ssh_address - user@ipaddress

The plugin will fall back to locally executing hh_client if one of these settings is missing.

Example Preferences.sublime-settings

To edit your settings go to Preferences -> Settings - User

{
  "hack_ssh_folder": "/home/tim/project/",
  "hack_ssh_address": "tim@10.0.0.1",
  "hack_ssh_enable": true
}