@@ -333,16 +333,15 @@ type InlayHintWorkspaceClientCapabilities =
333333 /// change that requires such a calculation.
334334 RefreshSupport: bool option }
335335
336- type CodeLensWorkspaceClientCapabilities = {
337- /// Whether the client implementation supports a refresh request sent from the
338- /// server to the client.
339- ///
340- /// Note that this event is global and will force the client to refresh all
341- /// code lenses currently shown. It should be used with absolute care and is
342- /// useful for situation where a server for example detect a project wide
343- /// change that requires such a calculation.
344- RefreshSupport: bool option
345- }
336+ type CodeLensWorkspaceClientCapabilities =
337+ { /// Whether the client implementation supports a refresh request sent from the
338+ /// server to the client.
339+ ///
340+ /// Note that this event is global and will force the client to refresh all
341+ /// code lenses currently shown. It should be used with absolute care and is
342+ /// useful for situation where a server for example detect a project wide
343+ /// change that requires such a calculation.
344+ RefreshSupport: bool option }
346345
347346/// Workspace specific client capabilities.
348347type WorkspaceClientCapabilities =
@@ -804,6 +803,48 @@ type TextDocumentClientCapabilities =
804803 /// @since 3.17.0
805804 InlayHint: InlayHintClientCapabilities option }
806805
806+ /// Client capabilities for the showDocument request.
807+ ///
808+ /// @since 3.16.0
809+ type ShowDocumentClientCapabilities =
810+ { /// The client has support for the showDocument request
811+ support: bool }
812+
813+ /// Capabilities specific to the `MessageActionItem` type
814+ type MessageActionItemCapabilties =
815+ { /// Whether the client supports additional attributes which
816+ /// are preserved and send back to the server in the
817+ /// request's response.
818+ additionalPropertiesSupport: bool option }
819+
820+ /// Show message request client capabilities
821+ type ShowMessageRequestClientCapabilities =
822+ { /// Capabilities specific to the `MessageActionItem` type
823+ messageActionItem: MessageActionItemCapabilties option }
824+
825+ type WindowClientCapabilities =
826+ { ///
827+ /// It indicates whether the client supports server initiated
828+ /// progress using the `window/workDoneProgress/create` request.
829+ ///
830+ /// The capability also controls Whether client supports handling
831+ /// of progress notifications. If set servers are allowed to report a
832+ /// `workDoneProgress` property in the request specific server
833+ /// capabilities.
834+ ///
835+ /// @since 3.15.0
836+ workDoneProgress: bool option
837+
838+ /// Capabilities specific to the showMessage request.
839+ ///
840+ /// @since 3.16.0
841+ showMessage: ShowMessageRequestClientCapabilities option
842+
843+ /// Capabilities specific to the showDocument request.
844+ ///
845+ /// @since 3.16.0
846+ showDocument: ShowDocumentClientCapabilities option }
847+
807848type ClientCapabilities =
808849 { /// Workspace specific client capabilities.
809850 Workspace: WorkspaceClientCapabilities option
@@ -812,7 +853,10 @@ type ClientCapabilities =
812853 TextDocument: TextDocumentClientCapabilities option
813854
814855 /// Experimental client capabilities.
815- Experimental: JToken option }
856+ Experimental: JToken option
857+
858+ /// Window specific client capabilities.
859+ Window: WindowClientCapabilities option }
816860
817861type WorkspaceFolder =
818862 { /// The associated URI for this workspace folder.
@@ -1942,11 +1986,11 @@ type ColorPresentation =
19421986type CodeActionKind = string
19431987
19441988type CodeActionTriggerKind =
1945- /// Code actions were explicitly requested by the user or by an extension.
1946- | Invoked = 1
1947- /// Code actions were requested automatically.
1948- /// This typically happens when current selection in a file changes, but can also be triggered when file content changes.
1949- | Automatic = 2
1989+ /// Code actions were explicitly requested by the user or by an extension.
1990+ | Invoked = 1
1991+ /// Code actions were requested automatically.
1992+ /// This typically happens when current selection in a file changes, but can also be triggered when file content changes.
1993+ | Automatic = 2
19501994
19511995/// Contains additional diagnostic information about the context in which
19521996/// a code action is run.
@@ -2284,4 +2328,102 @@ type InlayHint =
22842328
22852329 /// A data entry field that is preserved on a inlay hint between
22862330 /// a `textDocument/inlayHint` and a `inlayHint/resolve` request.
2287- Data: LSPAny option }
2331+ Data: LSPAny option }
2332+
2333+ type ProgressToken = U2< int, string>
2334+
2335+ type WorkDoneProgressCreateParams =
2336+ { ///The token to be used to report progress.
2337+ token: ProgressToken }
2338+
2339+ /// The base protocol offers also support to report progress in a generic fashion.
2340+ /// This mechanism can be used to report any kind of progress including work done progress
2341+ /// (usually used to report progress in the user interface using a progress bar) and partial
2342+ /// result progress to support streaming of results.
2343+ type ProgressParams < 'T > =
2344+ { /// The progress token provided by the client or server.
2345+ token: ProgressToken
2346+ /// The progress data.
2347+ value: 'T }
2348+
2349+ type WorkDoneProgressKind =
2350+ | Begin
2351+ | Report
2352+ | End
2353+ override x.ToString () =
2354+ match x with
2355+ | Begin -> " begin"
2356+ | Report -> " report"
2357+ | End -> " end"
2358+
2359+ type WorkDoneProgressEnd =
2360+ { /// WorkDoneProgressKind.End
2361+ kind: string
2362+ /// Optional, a final message indicating to for example indicate the outcome of the operation.
2363+ message: string option }
2364+ static member Create (? message ) = { kind = WorkDoneProgressKind.End.ToString(); message = message }
2365+
2366+ type WorkDoneProgressBegin =
2367+ { /// WorkDoneProgressKind.Begin
2368+ kind: string
2369+
2370+ /// Mandatory title of the progress operation. Used to briefly inform about
2371+ /// the kind of operation being performed.
2372+ ///
2373+ /// Examples: "Indexing" or "Linking dependencies".
2374+ title: string option
2375+ /// Controls if a cancel button should show to allow the user to cancel the
2376+ /// long running operation. Clients that don't support cancellation are allowed
2377+ /// to ignore the setting.
2378+ cancellable: bool option
2379+ /// Optional, more detailed associated progress message. Contains
2380+ /// complementary information to the `title`.
2381+ ///
2382+ /// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
2383+ /// If unset, the previous progress message (if any) is still valid.
2384+ message: string option
2385+ /// Optional progress percentage to display (value 100 is considered 100%).
2386+ /// If not provided infinite progress is assumed and clients are allowed
2387+ /// to ignore the `percentage` value in subsequent in report notifications.
2388+ ///
2389+ /// The value should be steadily rising. Clients are free to ignore values
2390+ /// that are not following this rule. The value range is [0, 100].
2391+ percentage: uint option }
2392+
2393+ static member Create ( title , ? cancellable , ? message , ? percentage ) =
2394+ { kind = WorkDoneProgressKind.Begin.ToString()
2395+ title = Some title
2396+ cancellable = cancellable
2397+ message = message
2398+ percentage = percentage }
2399+
2400+ type WorkDoneProgressReport =
2401+ { /// WorkDoneProgressKind.Report
2402+ kind: string
2403+ /// Controls enablement state of a cancel button.
2404+ ///
2405+ /// Clients that don't support cancellation or don't support controlling the button's
2406+ /// enablement state are allowed to ignore the property.
2407+ cancellable: bool option
2408+ /// Optional, more detailed associated progress message. Contains
2409+ /// complementary information to the `title`.
2410+ ///
2411+ /// Examples: "3/25 files", "project/src/module2", "node_modules/some_dep".
2412+ /// If unset, the previous progress message (if any) is still valid.
2413+ message: string option
2414+ /// Optional progress percentage to display (value 100 is considered 100%).
2415+ /// If not provided infinite progress is assumed and clients are allowed
2416+ /// to ignore the `percentage` value in subsequent in report notifications.
2417+ ///
2418+ /// The value should be steadily rising. Clients are free to ignore values
2419+ /// that are not following this rule. The value range is [0, 100].
2420+ percentage: uint option }
2421+
2422+ static member Create (? cancellable , ? message , ? percentage ) =
2423+ { kind = WorkDoneProgressKind.Report.ToString()
2424+ cancellable = cancellable
2425+ message = message
2426+ percentage = percentage }
2427+
2428+ /// The token to be used to report progress.
2429+ type WorkDoneProgressCancelParams = { token: ProgressToken }
0 commit comments