var file = cur_project.getByRelPath(BuilderApplication.opt_language_server);
if (file == null) {
// then compile them all, and compare them...
- GLib.error("missing file %s in project %s", BuilderApplication.opt_language_server, cur_project.name);
+
+ if (!GLib.FileUtils.test(BuilderApplication.opt_language_server, FileTest.EXISTS)) {
+ GLib.error("missing file %s in project %s", BuilderApplication.opt_language_server, cur_project.name);
+
+ }
+ // in theory we can test a vapi?
+ file = new JsRender.PlainFile(cur_project,BuilderApplication.opt_language_server);
}
var ls = file.getLanguageServer();
//Posix.sleep( 30 );
var loop = new MainLoop();
GLib.Timeout.add_seconds(1, () => {
-
- GLib.debug("Sending document_open");
+ if (!ls.isReady()) {
+ GLib.debug("LS not ready - try again");
+
+ return true;
+ }
+ //GLib.debug("Sending document_open");
// it's ready..
- ls.document_open(file);
- ls.document_save.begin( file, (o,res) => {
- ls.document_save.end(res);
- });
+ //ls.document_open(file);
+ //ls.document_save.begin( file, (o,res) => {
+ // ls.document_save.end(res);
+ //});
//ls.syntax.begin(file, (obj,res) => {
// ls.syntax.end(res);
- //});
+ //});
+ GLib.debug("Sending docSybmols");
+ ls.documentSymbols.begin(file, (o,res) => {
+ GLib.debug("Got doc symbols return");
+ ls.documentSymbols.end(res);
+ });
return false;