src/Palete/LanguageClientVala.vala
authorAlan <alan@roojs.com>
Wed, 27 Mar 2024 09:24:10 +0000 (17:24 +0800)
committerAlan <alan@roojs.com>
Wed, 27 Mar 2024 09:24:10 +0000 (17:24 +0800)
src/Palete/LanguageClientVala.vala

index 21ab933..ddd6caf 100644 (file)
@@ -828,6 +828,27 @@ namespace Palete {
                        
                
                }
+               public override async Gee.ArrayList<Lsp.WorkspaceSymbol> 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<Lsp.WorkspaceSymbol>();     
+                       //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