clemos / haxe-sublime-bundle

Sublime Text bundle for Haxe programming language
Apache License 2.0
237 stars 86 forks source link

AutoComplete Not Working. #110

Closed IkonOne closed 10 years ago

IkonOne commented 11 years ago

Windows 7 x86 Haxe 3 ST 2

The bundle was installed via Package Control.

When I type a period after a class, the auto-completion box pops up, but it doesn't actually list anything that belongs to the class as shown in this screen:

haxe_autocomplete

This is the only error in the console:

Reloading plugin C:\Users\MaskedPixel\AppData\Roaming\Sublime Text 2\Packages\Haxe\HaxeComplete.py main:27: DeprecationWarning: The xmllib module is obsolete. Use xml.sax instead.

Maybe I have done something wrong? Any pointers in the right direction would be great.

clemos commented 11 years ago

What kind of build file do you use: .hxml ? .nmml ? .xml ? You need such a file, especially if you use haxelib libraries like flixel. I suspect you don't have one, am I right ?

IkonOne commented 11 years ago

The build file is xml. The build system in sublime text works. I am using the latest version of openfl and flixel available on haxelib.

I forgot to mention before that the haxe server is in fact started on port 6001 without error.

Thanks for taking the time to look into this.

clemos commented 11 years ago

Can you please provide your .xml file along with the .hx source file so I can try to reproduce ?

Regards, Clément

IkonOne commented 11 years ago

Here is the entire project: https://dl.dropboxusercontent.com/u/9180491/Pong.zip

The baes project was created using the commandline: haxelib run flixel -name Pong -class PongMain

I have simply started adding a new state and sprite.

clemos commented 11 years ago

I get autocompletion on your project without problem... Don't you get any error message is the status bar at the bottom ?

IkonOne commented 11 years ago

Yes! I didn't see that...

After I enter a period it says:

Pong (openfl / Flash test), Error: Display File 'gamestate.hx' should not start with a lowercase letter.

clemos commented 11 years ago

It seems related to this somehow : https://github.com/HaxeFoundation/haxe/issues/1932 Reading the whole thread, it's not very clear how to solve it though... I'll try to see if I can reproduce and look into it next time I boot to Windows ;)

Meanwhile you may try to copy the .xml file, and clean it as much as possible to have only the minimum required tags (I guess <app> and <haxelib> tags should be enough). Then select the new .xml file using Ctrl+Shift+B and see if completion works with it... (Completion is cached, so you need to trigger it using . at a different position in your .hx source...)

IkonOne commented 11 years ago

Ok, I tried the minimal xml and that didn't work. Completion is also broken inside FD as well, so it most likely has nothing to do with ST2 or your add-on. I will go through that thread and see if I can come up with a solution.

IkonOne commented 10 years ago

Confirmed that this is indeed a haxe issue with a fix on the way.

https://github.com/HaxeFoundation/haxe/issues/1932#issuecomment-27228423