Skip to content

Commit a6f5008

Browse files
committed
feat: add vscoq/interrupt verb to language server
WIP
1 parent 7883909 commit a6f5008

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

language-server/protocol/extProtocol.ml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ module Notification = struct
6060
| InterpretToPoint of InterpretToPointParams.t
6161
| StepForward of StepForwardParams.t
6262
| StepBackward of StepBackwardParams.t
63+
| Interrupt
6364

6465
let of_jsonrpc (Jsonrpc.Notification.{ method_; params } as notif) =
6566
let open Lsp.Import.Result.O in
@@ -76,6 +77,7 @@ module Notification = struct
7677
| "vscoq/interpretToEnd" ->
7778
let+ params = Lsp.Import.Json.message_params params InterpretToEndParams.t_of_yojson in
7879
InterpretToEnd params
80+
| "vscoq/interrupt" -> Ok Interrupt
7981
| _ ->
8082
let+ notif = Lsp.Client_notification.of_jsonrpc notif in
8183
Std notif

language-server/vscoqtop/lspManager.ml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,8 @@ let workspaceDidChangeConfiguration params =
535535
| Continuous -> run_documents ()
536536
| Manual -> reset_observe_ids (); ([] : events)
537537

538+
let handle_interrupt () = []
539+
538540
let dispatch_std_request : type a. Jsonrpc.Id.t -> a Lsp.Client_request.t -> (a, error) result * events =
539541
fun id req ->
540542
match req with
@@ -590,6 +592,7 @@ let dispatch_notification =
590592
| InterpretToEnd params -> log (fun () -> "Received notification: vscoq/interpretToEnd"); coqtopInterpretToEnd params
591593
| StepBackward params -> log (fun () -> "Received notification: vscoq/stepBackward"); coqtopStepBackward params
592594
| StepForward params -> log (fun () -> "Received notification: vscoq/stepForward"); coqtopStepForward params
595+
| Interrupt -> log (fun () -> "Received notification: vscoq/interrupt"); handle_interrupt ()
593596
| Std notif -> dispatch_std_notification notif
594597

595598
let handle_lsp_event = function

0 commit comments

Comments
 (0)