Skip to content

Commit

Permalink
Add workspace/codeLens/refresh notification (#987)
Browse files Browse the repository at this point in the history
* Add `workspace/codeLens/refresh` notification

* Format
  • Loading branch information
Krzysztof-Cieslak committed Aug 16, 2022
1 parent ccf64be commit 41e751d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/FsAutoComplete/FsAutoComplete.Lsp.fs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ type FSharpLspClient(sendServerNotification: ClientNotificationSender, sendServe
member __.NotifyTestDetected(p: TestDetectedNotification) =
sendServerNotification "fsharp/testDetected" (box p) |> Async.Ignore

member __.CodeLensRefresh() =
sendServerNotification "workspace/codeLens/refresh" () |> Async.Ignore

type DiagnosticMessage =
| Add of source: string * diags: Diagnostic[]
| Clear of source: string
Expand Down Expand Up @@ -313,6 +316,8 @@ type FSharpLspServer(state: State, lspClient: FSharpLspClient) =
| NotificationEvent.FileParsed fn ->
let uri = Path.LocalPathToUri fn

lspClient.CodeLensRefresh() |> Async.Start

({ Content = UMX.untag uri }: PlainNotification)
|> lspClient.NotifyFileParsed
|> Async.Start
Expand Down

0 comments on commit 41e751d

Please sign in to comment.