@@ -132,6 +132,24 @@ let main () =
132132 Cache. deleteCache (Cache. targetFileFromLibBs libBs);
133133 print_endline " \" OK\" " )
134134 | _ -> print_endline " \" ERR: Did not find root \" " )
135+ | _ :: "rewatch" :: rewatchArgs -> (
136+ match rewatchArgs with
137+ | [" completion" ] -> CommandsRewatch. completion ()
138+ | [" completionResolve" ] -> CommandsRewatch. completionResolve ()
139+ | [" hover" ] -> CommandsRewatch. hover ()
140+ | [" definition" ] -> CommandsRewatch. definition ()
141+ | [" typeDefinition" ] -> CommandsRewatch. typeDefinition ()
142+ | [" references" ] -> CommandsRewatch. references ()
143+ | [" documentSymbol" ] -> CommandsRewatch. documentSymbol ()
144+ | [" prepareRename" ] -> CommandsRewatch. prepareRename ()
145+ | [" rename" ] -> CommandsRewatch. rename ()
146+ | [" signatureHelp" ] -> CommandsRewatch. signatureHelp ()
147+ | [" codeLens" ] -> CommandsRewatch. codeLens ()
148+ | [" inlayHint" ] -> CommandsRewatch. inlayHint ()
149+ | [" semanticTokens" ] -> CommandsRewatch. semanticTokens ()
150+ | [" codeAction" ] -> CommandsRewatch. codeAction ()
151+ | [" llmIndex" ] -> CommandsRewatch. llmIndex ()
152+ | _ -> prerr_endline " Unknown rewatch subcommand" )
135153 | [_; " completion" ; path; line; col; currentFile] ->
136154 printHeaderInfo path line col;
137155 Commands. completion ~debug ~path
@@ -147,7 +165,13 @@ let main () =
147165 Commands. typeDefinition ~path
148166 ~pos: (int_of_string line, int_of_string col)
149167 ~debug
150- | [_; " documentSymbol" ; path] -> DocumentSymbol. command ~path
168+ | [_; " documentSymbol" ; path] ->
169+ let source =
170+ match Files. readFile path with
171+ | Some s -> s
172+ | None -> " "
173+ in
174+ print_endline (DocumentSymbol. command ~path ~source )
151175 | [_; " hover" ; path; line; col; currentFile; supportsMarkdownLinks] ->
152176 Commands. hover ~path
153177 ~pos: (int_of_string line, int_of_string col)
0 commit comments