Closed hamaluik closed 8 years ago
Remember that the code completion is powered by haxe, using simple -cp
commands in the build.hxml file - open up bin/
You can kill the haxe server (task manager, or killall haxe
), and then run the haxe -v --wait 6111
command in a terminal. That will print everything the code completion receives and returns.
Hmm.. I think the issue was that after adding the library to the flow file, I didn't rebuild the sample project, which in turn didn't create the build.hxml
, which in turn meant the completions didn't work. I can somewhat confirm this by building the project, then removing the library from the sample project.
Which all makes sense now, and is a trivial step to overcome. Would it be reasonable to have the flow plugin update the buiild.hxml
file whenever changes are saved in the flow file?
It does when you save the flow file that is assigned as the active project. sublime text has no real way to know if the .flow
file extension you are saving has any relation to the active project, except by actual path atm. Deep coupling like that into the sublime workflow is not ideal, especially during active dev in alpha.
Secondly, The completion hxml comes from flow info
and stored in the sublime flow plugin. It is not the build.hxml on disk. The flow info
comes from the flow file, and is updated from 1) when set project as active is called or 2) the active flow file is modified/saved.
In other words, whenever you change something and things are possibly being weird related to completion specifically, refresh the info by set/save. I use set, as it is more explicit, unless it's the active flow file directly I'm modifying.
Not sure if this is sublime_flow or sublime_haxe, but autocomplete doesn't seem to pick up a library unless its explicitly set in a project .flow file, rather than the .flow file of the project's dependencies.
Example: in tusk.flow, I include
promhx
as a dependency. In the sample project.flow file, I depend ontusk
, which should mean I depend onsnow
andpromhx
and be picked up by autocompletion. Instead, autocompletion doesn't detectpromhx
until I include it as a dependency inproject.flow
.