+ if (!this.isReady()) {
+ GLib.debug("docsymbols not ready");
+ return ret;
+ }
+ if (this.getting_symbols) {
+ GLib.debug("docsymbols currently getting symbols");
+ return ret;
+ }
+
+
+ doc_symbol_queue_call_count++;
+ var call_id = yield this.queuer(doc_symbol_queue_call_count);
+ if (call_id != doc_symbol_queue_call_count) {
+ GLib.debug("docsymbols call id does not match %d %d" ,call_id , doc_symbol_queue_call_count);
+ return ret;
+ }
+ this.getting_symbols = true;
+
+ Variant? return_value;
+ try {
+ yield this.jsonrpc_client.call_async (
+ "textDocument/documentSymbol",
+ this.buildDict (
+
+ textDocument : this.buildDict ( ///TextDocumentItem;
+ uri: new GLib.Variant.string (file.to_url()),
+ version : new GLib.Variant.uint64 ( (uint64) file.version)
+ )
+
+ ),
+ null,
+ out return_value
+ );
+ } catch(Error e) {
+ this.getting_symbols = false;
+ throw e;
+ }
+ this.getting_symbols = false;
+
+ GLib.debug ("LS replied with %s", Json.to_string (Json.gvariant_serialize (return_value), true));
+ var json = Json.gvariant_serialize (return_value);
+
+
+
+ var ar = json.get_array();
+ GLib.debug ("LS replied with %D items", ar.get_length());
+ for(var i = 0; i < ar.get_length(); i++ ) {
+ var add= Json.gobject_deserialize ( typeof (Lsp.DocumentSymbol), ar.get_element(i)) as Lsp.DocumentSymbol;
+ ret.add( add);
+
+ }
+ return ret ;
+
+
+ }
+ // cant seem to get this to show anything!!
+ public override async Gee.ArrayList<Lsp.SignatureInformation> signatureHelp (JsRender.JsRender file, int line, int offset) throws GLib.Error {
+ /* partial_result_token , work_done_token context = null) */
+ GLib.debug("get signatureHelp %s, %d, %d", file.relpath, line, offset);
+ var ret = new Gee.ArrayList<Lsp.SignatureInformation>();
+ //ret = null;