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 3K
  • Win 1K
  • OS X 689
  • Linux 459
Dec 12 Dec 11 Dec 10 Dec 9 Dec 8 Dec 7 Dec 6 Dec 5 Dec 4 Dec 3 Dec 2 Dec 1 Nov 30 Nov 29 Nov 28 Nov 27 Nov 26 Nov 25 Nov 24 Nov 23 Nov 22 Nov 21 Nov 20 Nov 19 Nov 18 Nov 17 Nov 16 Nov 15 Nov 14 Nov 13 Nov 12 Nov 11 Nov 10 Nov 9 Nov 8 Nov 7 Nov 6 Nov 5 Nov 4 Nov 3 Nov 2 Nov 1 Oct 31 Oct 30 Oct 29 Oct 28
Windows 0 3 0 2 0 0 0 2 1 2 3 0 3 5 2 2 0 0 0 3 2 3 1 1 0 2 0 1 2 1 1 2 3 0 1 2 0 2 1 2 1 2 0 3 2 4
OS X 0 1 1 0 0 2 1 0 1 0 0 0 1 0 0 0 0 0 0 0 1 2 0 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 2 1 1 1 1 1 0 0
Linux 0 1 0 0 0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 3 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 1 0 0 1 0 0 1 0 1

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
}