Skip to content

Commit

Permalink
Add referesh capability for codelens
Browse files Browse the repository at this point in the history
  • Loading branch information
baronfel committed Aug 24, 2022
1 parent 7629297 commit ce109cb
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
18 changes: 17 additions & 1 deletion src/Types.fs
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,17 @@ type InlayHintWorkspaceClientCapabilities =
/// change that requires such a calculation.
RefreshSupport: bool option }

type CodeLensWorkspaceClientCapabilities = {
/// Whether the client implementation supports a refresh request sent from the
/// server to the client.
///
/// Note that this event is global and will force the client to refresh all
/// code lenses currently shown. It should be used with absolute care and is
/// useful for situation where a server for example detect a project wide
/// change that requires such a calculation.
RefreshSupport: bool option
}

/// Workspace specific client capabilities.
type WorkspaceClientCapabilities =
{ /// The client supports applying batch edits to the workspace by supporting
Expand Down Expand Up @@ -360,7 +371,12 @@ type WorkspaceClientCapabilities =
/// Client workspace capabilities specific to inlay hints.
///
/// @since 3.17.0
InlayHint: InlayHintWorkspaceClientCapabilities option }
InlayHint: InlayHintWorkspaceClientCapabilities option

/// Client workspace capabilities specific to code lenses.
///
/// @since 3.16.0
CodeLens: CodeLensWorkspaceClientCapabilities option }

type SynchronizationCapabilities =
{ /// Whether text document synchronization supports dynamic registration.
Expand Down
3 changes: 2 additions & 1 deletion tests/Benchmarks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,8 @@ type MultipleTypesBenchmarks() =
{ DynamicRegistration = Some false
SymbolKind = Some { ValueSet = Some SymbolKindCapabilities.DefaultValueSet } }
SemanticTokens = Some { RefreshSupport = Some true }
InlayHint = Some { RefreshSupport = Some false } }
InlayHint = Some { RefreshSupport = Some false }
CodeLens = Some { RefreshSupport = Some true } }
TextDocument =
Some
{ Synchronization =
Expand Down

0 comments on commit ce109cb

Please sign in to comment.