From fcff5b48d11d4c6638bfed30122f78eff10413c3 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 27 Mar 2024 17:24:10 +0800 Subject: [PATCH] src/Palete/LanguageClientVala.vala --- src/Palete/LanguageClientVala.vala | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/src/Palete/LanguageClientVala.vala b/src/Palete/LanguageClientVala.vala index 21ab93325..ddd6cafb5 100644 --- a/src/Palete/LanguageClientVala.vala +++ b/src/Palete/LanguageClientVala.vala @@ -828,6 +828,27 @@ namespace Palete { } + public override async Gee.ArrayList symbol (string sym) throws GLib.Error { + /* partial_result_token , work_done_token context = null) */ + GLib.debug("get symbol %s,", sym); + var ret = new Gee.ArrayList(); + //ret = null; + if (!this.isReady()) { + return ret; + } + Variant? return_value; + yield this.jsonrpc_client.call_async ( + "textDocument/symbol", + this.buildDict ( + query : new GLib.Variant.string (sym) + ), + null, + out return_value + ); + + GLib.debug ("LS replied with %D items", ar.get_length()); + return ret; + } } @@ -838,6 +859,4 @@ namespace Palete { - - } \ No newline at end of file -- 2.39.2