From 27e9ddee53b8fa43725f951434404691d8012190 Mon Sep 17 00:00:00 2001 From: Marcos Magueta Date: Sun, 12 Jul 2026 18:27:44 -0300 Subject: language server over stdio, emacs mode with repl and eglot wiring --- bin/main.ml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'bin/main.ml') diff --git a/bin/main.ml b/bin/main.ml index c5c329a..eb212d2 100644 --- a/bin/main.ml +++ b/bin/main.ml @@ -48,6 +48,7 @@ let repl () = print_endline "Sol. Statements accumulate; Query expression: ... runs."; let rec loop history = print_string "sol> "; + flush stdout; match In_channel.input_line stdin with | None -> () | Some line when String.trim line = "" -> loop history @@ -73,7 +74,8 @@ let repl () = let () = match Sys.argv with | [| _ |] -> repl () + | [| _; "lsp" |] -> Lsp.run () | [| _; path |] -> run_file path | _ -> - prerr_endline "usage: sol [file.sol]"; + prerr_endline "usage: sol [file.sol | lsp]"; exit 1 -- cgit v1.2.3