SiebelsTim / hack-sublime

Hack's typechecker & autocompletion inside Sublime Text
30 stars 4 forks source link

.hhconfig not found #1

Closed girvo closed 10 years ago

girvo commented 10 years ago

Hi there!

Super excited about being able to use Hack in Sublime Text :smile:

I have a project that has a .hhconfig file at the top level of it, and code that lives in src/ inside that top-lever folder, however editing code and pressing C- gives .hhconfig not found as output into my code (quite an interesting autocomplete!).

Also, I'm unsure how to trigger type checking? The vim plugin triggers it on save, but I can't find anywhere to run the type checker in Sublime.

Well done, and I have to say thanks as this gives me a base to start porting it over to Komodo Edit/IDE (which runs Python as well, CodeIntel was originally ported to Sublime from Komodo).

Edit

Ah, see, this is how you know I use Vim and not Sublime... I opened up the console and saw this error message:

FileNotFoundError: [Errno 2] No such file or directory: 'hh_client'

Now, this is running on OS X, but hh_client is installed in /usr/local/bin/ along with hh_server, and they both work correctly. What do I need to change?

girvo commented 10 years ago

So, I had a poke around the code. I'm no Python programmer, so please don't shoot me if it's horrible! See PR https://github.com/SiebelsTim/hack-sublime/pull/2

I still don't know how to trigger the Type checker however :(

SiebelsTim commented 10 years ago

Hi @girvo, thank you so much for your PR :)

I run the typerchecker on save as well. But if it fails to find hh_client it can't create the window I suppose. The .hhconfig error you get is because I'm stupid. I search for it in the current folder, rather than project. I am not quite sure if your suggested fix works all the time though. Maybe I'll let the typechecker itself return the error. I'll look into your PR later (probably a few hours) and test it on linux when I'm in front of my machine.

SiebelsTim commented 10 years ago

Hopefully closed in e3d42685